Subversion Repositories wimsdev

Rev

Rev 16091 | Blame | Compare with Previous | Last modification | View Log | RSS feed

!if $job2=restore
  !goto next
!endif
wims_deposit=!word 1 of $wims_deposit
selection=
gotlist=

!if . notin $wims_deposit or / isin $wims_deposit or .. isin $wims_deposit
  error=bad_file
  !exit
!endif

t=!translate . to $ $ in $wims_deposit
format=!word 2 to -1 of $t
format=!translate $ $ to . in $format
!if $format notwordof tgz tar.gz zip
  error=bad_file
  !exit
!endif

!sh $wims_home/public_html/scripts/adm/decompress.sh
:next
new=$wims_sesdir/upload/class
old=log/classes/$wims_class
v=!record 0 of wimshome/$new/version
v=!trim $v
!!version <=4 for classes
!if $v=$empty or $v<4
  error=bad_file
  !exit
!endif

!for type in new,old
  !read scripts/reccnt.proc $type $($type)
  t=!defof class_defined in wimshome/$($type)/.def
  !if $t=yes
    $(type)_defcnt=1
  !else
    $(type)_defcnt=0
  !endif
!next type
new_reccnt=$[$new_reccnt+$new_defcnt+$new_supcnt]
forbiddenlist=$empty

!for rec in $reclist
  !if $(new_$(rec)cnt)>0
    gotlist=!append item $rec to $gotlist
    !if $(max_$rec)!=$empty and $(new_$(rec)cnt)>$(max_$rec)
      forbiddenlist=!append word $rec to $forbiddenlist
    !endif
  !endif
!next rec
!if $forbiddenlist!=$empty
  dictionary=$module_dir/arch/recdepinv
  forbiddenlistdep=!exec translator $forbiddenlist
  forbiddenlistdep=!words2items $forbiddenlistdep
  forbiddenlist=!words2items $forbiddenlist
  forbiddenlistdep=!listunion $forbiddenlistdep and $forbiddenlist
!endif

!if $gotlist=$empty
  error=empty_file
  !exit
!endif

serial=!record 0 of wimshome/$new/serial
serial=!word 1 of $serial

!readdef wimshome/log/classes/$wims_class/neighbors