Rev 15554 | 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 |
||
18264 | bpr | 21 | title=!module title_$lang $dir |
22 | !default title=!module title $dir |
||
23 | desc=!module description_$lang $dir |
||
24 | !default desc=!module description $dir |
||
12330 | bpr | 25 | desc=!singlespace $desc |
26 | desc=!char 1 to $desc_limit of $desc |
||
27 | title=!singlespace $title |
||
28 | title=!char 1 to $title_limit of $title |
||
29 | status=0 |
||
30 | update=$empty |
||
31 | wksheet=0 |
||
12338 | bpr | 32 | !for i=1 to $($(type)tot) |
33 | e=!record $i of wimshome/log/classes/$wims_class/$type/.$(type)index |
||
12330 | bpr | 34 | !distribute lines $e into wdi,win,otitle |
35 | !if $dir=$wdi and $iniparm=$win |
||
36 | test=$i |
||
37 | error=already_exist |
||
38 | title=$otitle |
||
39 | !exit |
||
40 | !endif |
||
41 | !next i |
||
42 | sdir=$dir |
||
43 | siniparm=$iniparm |
||
9623 | guerimand | 44 | !endif |
45 | |||
46 | !if $step=1 |
||
12338 | bpr | 47 | test=!defof category in wimshome/public_html/modules/$sdir/INDEX |
48 | !if tool iswordof $test |
||
49 | !set type=tool |
||
50 | !else |
||
51 | !set type=doc |
||
52 | !endif |
||
12330 | bpr | 53 | desc=!singlespace $desc |
54 | desc=!char 1 to $desc_limit of $desc |
||
55 | title=!singlespace $title |
||
56 | title=!char 1 to $title_limit of $title |
||
57 | !bound status within 0,1 default 0 |
||
12338 | bpr | 58 | !if $type=tool |
59 | !reset wksheet |
||
60 | !else |
||
61 | !bound wksheet within 0 and $nbsheet default 0 |
||
62 | !endif |
||
15554 | bpr | 63 | !if $type=tool and $siniparm!=$empty |
64 | !set siniparm=cmd=new&$siniparm |
||
65 | !endif |
||
12338 | bpr | 66 | !appendfile wimshome/log/classes/$wims_class/$type/.$(type)index :$sdir\ |
9644 | guerimand | 67 | $siniparm\ |
9623 | guerimand | 68 | $title\ |
69 | $desc\ |
||
70 | $status\ |
||
9629 | guerimand | 71 | $wksheet\ |
9623 | guerimand | 72 | |
12338 | bpr | 73 | |
74 | s$type=!recordcnt wimshome/log/classes/$wims_class/$type/.$(type)index |
||
12330 | bpr | 75 | wims_module_log=class $wims_class: add $sdir |
76 | dir=$sdir |
||
77 | iniparm=$siniparm |
||
12338 | bpr | 78 | message=$(name_confirm$type) |
12330 | bpr | 79 | job=prop |
9623 | guerimand | 80 | |
81 | !endif |