Subversion Repositories wimsdev

Rev

Rev 12330 | Rev 15554 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
9623 guerimand 1
!bound step within 0,1 default 0
2
 
3
!if $step=0
12330 bpr 4
  test=!defof category in wimshome/public_html/modules/$dir/INDEX
5
  !if ../adm/ isin ../$dir or $dir=home or \
6
      (../devel/ isin ../$dir and $wims_devel_modules notwordof open) or \
12338 bpr 7
      (document notwordof $test and tool notwordof $test)
12330 bpr 8
    error=insert_fail
12338 bpr 9
    !exit
12330 bpr 10
  !endif
12338 bpr 11
  !if document iswordof $test
12
    !set type=doc
13
  !endif
14
  !if tool iswordof $test
15
    !set type=tool
16
  !endif
17
  !if $($(type)tot)>=$(max_$(type))
18
    error=max$type
12330 bpr 19
    !exit
20
  !endif
21
  title=!module title $dir
22
  desc=!module description $dir
23
  desc=!singlespace $desc
24
  desc=!char 1 to $desc_limit of $desc
25
  title=!singlespace $title
26
  title=!char 1 to $title_limit of $title
27
  status=0
28
  update=$empty
29
  wksheet=0
12338 bpr 30
  !for i=1 to $($(type)tot)
31
    e=!record $i of wimshome/log/classes/$wims_class/$type/.$(type)index
12330 bpr 32
    !distribute lines $e into wdi,win,otitle
33
    !if $dir=$wdi and $iniparm=$win
34
      test=$i
35
      error=already_exist
36
      title=$otitle
37
      !exit
38
    !endif
39
  !next i
40
  sdir=$dir
41
  siniparm=$iniparm
9623 guerimand 42
!endif
43
 
44
!if $step=1
12338 bpr 45
  test=!defof category in wimshome/public_html/modules/$sdir/INDEX
46
  !if tool iswordof $test
47
    !set type=tool
48
  !else
49
    !set type=doc
50
  !endif
12330 bpr 51
  desc=!singlespace $desc
52
  desc=!char 1 to $desc_limit of $desc
53
  title=!singlespace $title
54
  title=!char 1 to $title_limit of $title
55
  !bound status within 0,1 default 0
12338 bpr 56
  !if $type=tool
57
    !reset wksheet
58
  !else
59
    !bound wksheet within 0 and $nbsheet default 0
60
  !endif
61
  !appendfile wimshome/log/classes/$wims_class/$type/.$(type)index :$sdir\
9644 guerimand 62
$siniparm\
9623 guerimand 63
$title\
64
$desc\
65
$status\
9629 guerimand 66
$wksheet\
9623 guerimand 67
 
12338 bpr 68
 
69
  s$type=!recordcnt wimshome/log/classes/$wims_class/$type/.$(type)index
12330 bpr 70
  wims_module_log=class $wims_class: add $sdir
71
  dir=$sdir
72
  iniparm=$siniparm
12338 bpr 73
  message=$(name_confirm$type)
12330 bpr 74
  job=prop
9623 guerimand 75
 
76
!endif