Rev 16343 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1406 | bpr | 1 | |
3912 | bpr | 2 | !bound seq between integer 1 and $seq_cnt+1 default $empty |
16143 | guerimand | 3 | jquery_defined=!defof jquery_defined in themes/$wims_theme/header.phtml |
1406 | bpr | 4 | |
5 | !if $cf_abandon!=$empty or $seq=$empty |
||
12335 | bpr | 6 | !reset cf_abandon |
7 | job=show |
||
8 | !exit |
||
1406 | bpr | 9 | !endif |
10 | |||
11 | !if $seq>$maxseq |
||
12335 | bpr | 12 | error=toomanyseq |
13 | !exit |
||
1406 | bpr | 14 | !endif |
15 | |||
16143 | guerimand | 16 | !readproc adm/vfilter/listvarfilter.proc |
17 | |||
16801 | guerimand | 18 | sharers= |
19 | sharing1=!defof sharable_sheet in wimshome/log/classes/$wims_class/neighbors |
||
20 | !for c in $sharing1 |
||
21 | d=!defof sharing_sheet in wimshome/log/classes/$c/neighbors |
||
22 | !if $d issametext $wims_class |
||
23 | sharers=!append item $c to $sharers |
||
24 | !endif |
||
25 | !next c |
||
26 | |||
16158 | guerimand | 27 | !if $save!=$empty or ($old_allowtype!=$allowtype and ($allowtype=techvar and $old_allowtechvar!=$allowtechvar)) |
15987 | guerimand | 28 | seq_desc=!replace internal $\ |
29 | $ by $ $ in $seq_desc |
||
15988 | guerimand | 30 | seq_title=!char 1 to $title_limit of $seq_title |
31 | seq_desc=!char 1 to $desc_limit of $seq_desc |
||
14049 | bpr | 32 | new_data=:$seq_title\ |
15998 | guerimand | 33 | $seq_desc |
16343 | bpr | 34 | !! ------ manage of allow |
16154 | guerimand | 35 | !if $tv_listname=$empty |
36 | !bound allowtype within all,none,select default all |
||
37 | !else |
||
38 | !bound allowtype within all,none,select,techvar default all |
||
39 | !endif |
||
40 | !read adm/scorerestriction get |
||
41 | IPlist=$_output |
||
42 | IPlist=!translate ,;\ |
||
16143 | guerimand | 43 | * to $ $ in $IPlist |
16154 | guerimand | 44 | IPlist=!trim $IPlist |
45 | !if $allowtype=select and $IPlist=$empty and $save!=$empty |
||
16343 | bpr | 46 | allowtype=all |
16154 | guerimand | 47 | !endif |
48 | !if $allowtype=all |
||
16343 | bpr | 49 | allow_parm= |
16154 | guerimand | 50 | !endif |
51 | !if $allowtype=none |
||
16343 | bpr | 52 | allow_parm=none |
16154 | guerimand | 53 | !endif |
54 | !if $allowtype=select |
||
16343 | bpr | 55 | allow_parm=$IPlist |
16154 | guerimand | 56 | !endif |
16143 | guerimand | 57 | old_allowtype=$allowtype |
58 | old_allowtechvar=$allowtechvar |
||
16153 | guerimand | 59 | !if $allowtype=techvar |
60 | !readproc adm/vfilter/shexselect.proc .S$seq |
||
61 | !endif |
||
16143 | guerimand | 62 | !! ---- save modification of allow parameters for sequence |
16343 | bpr | 63 | !if $sharers!=$empty and $allowshare=1 |
16801 | guerimand | 64 | !if $allowtype=techvar |
65 | !readproc adm/vfilter/validtechvar.proc $allowtechvar\ |
||
66 | $sharers |
||
67 | !if $output=1 |
||
68 | setclass=$wims_class,$sharers |
||
69 | !else |
||
70 | error=badallowshare |
||
71 | allowshare=0 |
||
72 | setclass=$wims_class |
||
73 | !endif |
||
74 | !else |
||
75 | setclass=$wims_class,$sharers |
||
76 | !endif |
||
16343 | bpr | 77 | !else |
78 | setclass=$wims_class |
||
16801 | guerimand | 79 | !endif |
16343 | bpr | 80 | !if $allow_parm=$empty |
81 | !sh for c in $setclass; do rm -f $wims_home/log/classes/$$c/.S$seq; done |
||
82 | !else |
||
16801 | guerimand | 83 | setclass=!words2items $setclass |
16343 | bpr | 84 | !for c in $setclass |
85 | !writefile wimshome/log/classes/$c/.S$seq $allow_parm |
||
86 | !next c |
||
87 | !endif |
||
88 | wims_class_log=sequence $seq allow $allowtype $allowshare by $wims_realuser |
||
16143 | guerimand | 89 | !! ---- end of saving |
16343 | bpr | 90 | !! -------- end manage of allow |
14049 | bpr | 91 | !set listdoc=!makelist doc_ i for i=1 to $docpubliccnt |
92 | !set listc=!filelist $wims_home/log/classes/$wims_class/doc |
||
93 | !set listc=!lines2items $listc |
||
94 | !set listc=!replace internal c by c_$ $ in $listc |
||
95 | !set listexam=!makelist exam_ i for i=1 to $examcnt |
||
96 | !set listsheet=!makelist sheet_ i for i=1 to $sheetcnt |
||
97 | !set listvote=!makelist vote_ i for i=1 to $votecnt |
||
98 | !set listtool=!makelist tool_ i for i=1 to $toolcnt |
||
99 | !set listglossary=!makelist glossary_ i for i=1 to $glossarycnt |
||
14769 | guerimand | 100 | !set listfreework=!makelist freework_ i for i=1 to $freeworkcnt |
101 | list=!nospace $listc,$listdoc,$listsheet,$listexam,$listvote,$listtool,$listglossary,$listfreework |
||
14049 | bpr | 102 | list=!nonempty items $list |
103 | list1=debut |
||
104 | !for x in $list |
||
105 | list1=!append item $($x) to $list1 |
||
106 | !next |
||
107 | list1=$(list1[2..-1]) |
||
108 | listcnt=!replace internal ,0, by , in ,$list1, |
||
109 | listcnt=!nonempty items $listcnt |
||
110 | listcnt=!itemcnt $listcnt |
||
111 | !for j = 1 to $listcnt |
||
112 | jj=!positionof item $j in $list1 |
||
113 | !if $jj!= |
||
114 | listfinal=!append item $(list[$jj]) to $listfinal |
||
115 | !endif |
||
14769 | guerimand | 116 | !next j |
14049 | bpr | 117 | list=!replace internal _ by $ $ in $(listfinal) |
16229 | guerimand | 118 | new_data=$new_data\ |
119 | $list |
||
15989 | guerimand | 120 | !bound visible within 0,1 default 0 |
14049 | bpr | 121 | !writefile wimshome/log/classes/$wims_class/seq/.sequence$seq $new_data\ |
16143 | guerimand | 122 | $visible |
1406 | bpr | 123 | |
14049 | bpr | 124 | s_ =!record 0 of .sequences |
125 | s_=!line 2 to -1 of s_ |
||
126 | !if $seq= $[$seq_cnt+1] |
||
127 | seq_cnt=$[$seq_cnt+1] |
||
128 | !writefile wimshome/log/classes/$wims_class/seq/.sequences $seq_cnt\ |
||
129 | $s_ |
||
130 | !endif |
||
1406 | bpr | 131 | !endif |
16143 | guerimand | 132 | |
16154 | guerimand | 133 | !! --- read saving configuration for allow parameters |
134 | !readproc adm/vfilter/shexread.proc S$seq |
||
135 | !! to distribute IPlist content into variable |
||
136 | !read adm/scorerestriction put\ |
||
16143 | guerimand | 137 | $IPlist |
138 | old_allowtype=$allowtype |
||
139 | old_allowtechvar=$allowtechvar |
||
16153 | guerimand | 140 | !reset save |
16143 | guerimand | 141 | !! --- end of reading |