Subversion Repositories wimsdev

Rev

Rev 5106 | Rev 12739 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5106 Rev 12457
Line 8... Line 8...
8
!endif
8
!endif
9
 
9
 
10
!bound nlevel between integer 0 and 3 default $l_
10
!bound nlevel between integer 0 and 3 default $l_
11
 
11
 
12
!ifval $nlevel!=$l_
12
!ifval $nlevel!=$l_
13
 !ifval $nlevel%2=0
13
  !ifval $nlevel%2=0
14
  !if $nsharing!=$empty
14
    !if $nsharing!=$empty
15
   error=remote_sharing
15
      error=remote_sharing
16
   !advance nlevel
16
      !advance nlevel
-
 
17
    !else
-
 
18
      n_sup=!listcomplement $nei in $n_sup
-
 
19
    !endif
17
  !else
20
  !else
18
   n_sup=!listcomplement $nei in $n_sup
21
    n_sup=!append item $nei to $n_sup
-
 
22
    n_sup=!listuniq $n_sup
19
  !endif
23
  !endif
20
 !else
-
 
21
  n_sup=!append item $nei to $n_sup
-
 
22
  n_sup=!listuniq $n_sup
-
 
23
 !endif
-
 
24
 !ifval $nlevel<2
24
  !ifval $nlevel<2
25
  n_part=!listcomplement $nei in $n_part
25
    n_part=!listcomplement $nei in $n_part
26
 !else
26
  !else
27
  n_part=!append item $nei to $n_part
27
    n_part=!append item $nei to $n_part
28
  n_part=!listuniq $n_part
28
    n_part=!listuniq $n_part
29
 !endif
29
  !endif
30
 !setdef n_sup=$n_sup\
30
  !setdef n_sup=$n_sup\
31
n_part=$n_part in wimshome/log/classes/$wims_class/neighbors
31
n_part=$n_part in wimshome/log/classes/$wims_class/neighbors
32
 wims_class_log=Neighbor level $nlevel with $nei by $wims_realuser
32
  wims_class_log=Neighbor level $nlevel with $nei by $wims_realuser
33
!endif
33
!endif
34
 
34
 
35
sharablelist=!listcomplement $sharing in $sharelist
35
sharablelist=!listcomplement $sharing in $sharelist
36
!if $changeshare!=$empty
36
!if $changeshare!=$empty
37
 changed=0
37
  changed=0
38
 wims_class_log=Allow $nei share $mksharable by $wims_realuser
38
  wims_class_log=Allow $nei share $mksharable by $wims_realuser
39
 !for r in $sharablelist
39
  !for r in $sharablelist
40
  !if $r isitemof $mksharable and $nei notitemof $(sharable_$r)
40
    !if $r isitemof $mksharable and $nei notitemof $(sharable_$r)
41
   sharable_$r=!append item $nei to $(sharable_$r)
41
      sharable_$r=!append item $nei to $(sharable_$r)
42
   changed=1
42
      changed=1
-
 
43
    !endif
-
 
44
    !if $r notitemof $mksharable and $nei isitemof $(sharable_$r)
-
 
45
      !if $r isitemof $nsharing
-
 
46
        error=$error remote_sharing
-
 
47
      !else
-
 
48
        sharable_$r=!listcomplement $nei in $(sharable_$r)
-
 
49
        changed=1
-
 
50
      !endif
-
 
51
    !endif
-
 
52
  !next r
-
 
53
  !if $changed>0
-
 
54
    shlist=
-
 
55
    !for sh in $sharablelist
-
 
56
      shlist=!append item $(sharable_$sh) to $shlist
-
 
57
    !next sh
-
 
58
    sharable_all=!listuniq $shlist
-
 
59
    !read neighbor/writeneighbor.proc
43
  !endif
60
  !endif
44
  !if $r notitemof $mksharable and $nei isitemof $(sharable_$r)
-
 
45
   !if $r isitemof $nsharing
-
 
46
    error=$error remote_sharing
-
 
47
   !else
-
 
48
    sharable_$r=!listcomplement $nei in $(sharable_$r)
-
 
49
    changed=1
-
 
50
   !endif
-
 
51
  !endif
-
 
52
 !next r
-
 
53
 !if $changed>0
-
 
54
  shlist=
-
 
55
  !for sh in $sharablelist
-
 
56
   shlist=!append item $(sharable_$sh) to $shlist
-
 
57
  !next sh
-
 
58
  sharable_all=!listuniq $shlist
-
 
59
  !read neighbor/writeneighbor.proc
-
 
60
 !endif
-
 
61
!endif
61
!endif
62
 
62
 
63
!reset mksharable,changeshare
63
!reset mksharable,changeshare
64
!for r in $sharablelist
64
!for r in $sharablelist
65
 !if $nei isitemof $(sharable_$r)
65
  !if $nei isitemof $(sharable_$r)
66
  mksharable=!append item $r to $mksharable
66
    mksharable=!append item $r to $mksharable
67
 !endif
67
  !endif
68
!next r
68
!next r
69
 
-