Rev 4061 | Rev 4176 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4061 | Rev 4118 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | qclass=!translate internal ./,;?* to $ $ in $qclass |
1 | qclass=!translate internal ./,;?* to $ $ in $qclass |
2 | !if $ $ isin $qclass |
2 | !if $ $ isin $qclass |
- | 3 | error=wrong class id |
|
3 |
|
4 | !exit |
4 | !endif |
5 | !endif |
5 | 6 | ||
6 | !if $qclass=$empty or $rclass=$empty |
7 | !if $qclass=$empty or $rclass=$empty |
- | 8 | error=undefined class |
|
- | 9 | !exit |
|
- | 10 | !endif |
|
- | 11 | ||
7 |
|
12 | !if _ isin $qclass |
- | 13 | qclass=!translate internal _ to , in $qclass |
|
8 |
|
14 | nb=!itemcnt $qclass |
- | 15 | ||
- | 16 | # the recursivity down here only works for 2 levels |
|
- | 17 | !if $nb>2 |
|
- | 18 | error=too many subdivisions in class id ($nb) |
|
- | 19 | !exit |
|
- | 20 | !endif |
|
- | 21 | ||
- | 22 | subclassid=!item 2 of $qclass |
|
- | 23 | qclass = !item 1 of $qclass |
|
- | 24 | ||
- | 25 | ||
- | 26 | !read scripts/check.class |
|
- | 27 | !if $error!=$empty |
|
- | 28 | !exit |
|
- | 29 | !endif |
|
- | 30 | ||
- | 31 | type=!defof class_type in $classdeffile |
|
- | 32 | !if $type != 2 |
|
- | 33 | error=sorry, there shouldn't be a subclass in a simple class |
|
9 | !exit |
34 | !exit |
- | 35 | !endif |
|
- | 36 | ||
- | 37 | qclass = $qclass/$subclassid |
|
- | 38 | ||
10 | !endif |
39 | !endif |
- | 40 | ||
11 | 41 | ||
12 | classdeffile=wimshome/log/classes/$qclass/.def |
42 | classdeffile=wimshome/log/classes/$qclass/.def |
13 | classexofile=wimshome/log/classes/$qclass/.defs |
43 | classexofile=wimshome/log/classes/$qclass/.defs |
14 | 44 | ||
15 | test=!defof class_defined in $classdeffile |
45 | test=!defof class_defined in $classdeffile |
16 | !if $test!=yes |
46 | !if $test!=yes |
17 |
|
47 | error=class $qclass not existing |
- | 48 | !exit |
|
18 | !endif |
49 | !endif |
- | 50 | ||
19 | test=!defof class_connections in $classdeffile |
51 | test=!defof class_connections in $classdeffile |
20 | test=!items2words $test |
52 | test=!items2words $test |
21 | test1=!translate internal +,; to $ $ in $test |
53 | test1=!translate internal +,; to $ $ in $test |
22 | !if $ident/$rclass notwordof $test1 |
54 | !if $ident/$rclass notwordof $test1 |
23 | error=connection refused by requested class |
55 | error=connection refused by requested class ($qclass) |
24 | !exit |
56 | !exit |
25 | !endif |
57 | !endif |
26 | 58 | ||
27 | !if $job iswordof modclass delclass adduser moduser deluser recuser \ |
59 | !if $job iswordof modclass delclass adduser moduser deluser recuser \ |
28 | putcsv update and\ |
60 | putcsv update and\ |