Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
16124 | guerimand | 1 | # check if subclass $wims_read_parm can be add in a structure |
2 | # wims_read_parm:number of the class to add |
||
3 | |||
4 | !if $wims_read_parm=$empty |
||
5 | error=subclasslimit |
||
6 | !exit |
||
7 | !endif |
||
8 | |||
9 | !if / notin $wims_read_parm |
||
10 | !exit |
||
11 | !endif |
||
12 | max_subclasses=!defof MAX_SUBCLASSES in wimshome/public_html/bases/sys/define.conf |
||
13 | code_=!replace internal / by , in $wims_read_parm |
||
14 | type_=!itemcnt $code_ |
||
15 | !if $type_=2 |
||
16 | !! subclasses in a groupement or level in a portal |
||
17 | list=!sh cd $wims_home/log/classes/$(code_[1]);\ |
||
18 | ls -d [0-9]*; |
||
19 | !else |
||
20 | !! subclasses in a portal |
||
21 | tmp_=!item 1 to -2 of $code_ |
||
22 | tmp_=!replace internal , by / in $tmp_ |
||
23 | tmp_=!nospace $tmp_ |
||
24 | c_=!char 1 of $(code_[-1]) |
||
25 | list=!sh cd $wims_home/log/classes/$tmp_;\ |
||
26 | ls -d $c_[0-9]*; |
||
27 | !endif |
||
28 | nb_=!wordcnt $list |
||
29 | !if $nb_>=$max_subclasses |
||
30 | error=subclasslimit |
||
31 | !endif |
||
32 | |||
33 |