Rev 16804 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
23 | reyssat | 1 | |
2 | l_=0 |
||
3 | !if $nei isitemof $n_sup |
||
12739 | bpr | 4 | !advance l_ |
23 | reyssat | 5 | !endif |
6 | !if $nei isitemof $n_part |
||
12739 | bpr | 7 | l_=$[$l_+2] |
23 | reyssat | 8 | !endif |
9 | |||
10 | !bound nlevel between integer 0 and 3 default $l_ |
||
11 | |||
12 | !ifval $nlevel!=$l_ |
||
12457 | bpr | 13 | !ifval $nlevel%2=0 |
14 | !if $nsharing!=$empty |
||
15 | error=remote_sharing |
||
16 | !advance nlevel |
||
17 | !else |
||
18 | n_sup=!listcomplement $nei in $n_sup |
||
19 | !endif |
||
23 | reyssat | 20 | !else |
12457 | bpr | 21 | n_sup=!append item $nei to $n_sup |
22 | n_sup=!listuniq $n_sup |
||
23 | reyssat | 23 | !endif |
12457 | bpr | 24 | !ifval $nlevel<2 |
25 | n_part=!listcomplement $nei in $n_part |
||
26 | !else |
||
27 | n_part=!append item $nei to $n_part |
||
28 | n_part=!listuniq $n_part |
||
29 | !endif |
||
30 | !setdef n_sup=$n_sup\ |
||
23 | reyssat | 31 | n_part=$n_part in wimshome/log/classes/$wims_class/neighbors |
12457 | bpr | 32 | wims_class_log=Neighbor level $nlevel with $nei by $wims_realuser |
23 | reyssat | 33 | !endif |
34 | |||
5106 | bpr | 35 | sharablelist=!listcomplement $sharing in $sharelist |
23 | reyssat | 36 | !if $changeshare!=$empty |
12457 | bpr | 37 | changed=0 |
17104 | guerimand | 38 | classexp=!defof class_expiration in wimshome/log/classes/$wims_class/.def |
39 | neiexp=!defof class_expiration in wimshome/log/classes/$nei/.def |
||
40 | !if $classexp<$neiexp |
||
41 | error=sharable_expdate $neiexp |
||
42 | !goto end |
||
43 | !endif |
||
44 | |||
16804 | guerimand | 45 | detail_share=open |
12457 | bpr | 46 | wims_class_log=Allow $nei share $mksharable by $wims_realuser |
47 | !for r in $sharablelist |
||
48 | !if $r isitemof $mksharable and $nei notitemof $(sharable_$r) |
||
49 | sharable_$r=!append item $nei to $(sharable_$r) |
||
50 | changed=1 |
||
51 | !endif |
||
52 | !if $r notitemof $mksharable and $nei isitemof $(sharable_$r) |
||
53 | !if $r isitemof $nsharing |
||
54 | error=$error remote_sharing |
||
55 | !else |
||
56 | sharable_$r=!listcomplement $nei in $(sharable_$r) |
||
57 | changed=1 |
||
58 | !endif |
||
59 | !endif |
||
60 | !next r |
||
61 | !if $changed>0 |
||
62 | shlist= |
||
63 | !for sh in $sharablelist |
||
64 | shlist=!append item $(sharable_$sh) to $shlist |
||
65 | !next sh |
||
66 | sharable_all=!listuniq $shlist |
||
67 | !read neighbor/writeneighbor.proc |
||
23 | reyssat | 68 | !endif |
69 | !endif |
||
70 | |||
17104 | guerimand | 71 | :end |
23 | reyssat | 72 | !reset mksharable,changeshare |
73 | !for r in $sharablelist |
||
12457 | bpr | 74 | !if $nei isitemof $(sharable_$r) |
75 | mksharable=!append item $r to $mksharable |
||
76 | !endif |
||
23 | reyssat | 77 | !next r |