Subversion Repositories wimsdev

Rev

Rev 12739 | Go to most recent revision | 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
16804 guerimand 38
  detail_share=open
12457 bpr 39
  wims_class_log=Allow $nei share $mksharable by $wims_realuser
40
  !for r in $sharablelist
41
    !if $r isitemof $mksharable and $nei notitemof $(sharable_$r)
42
      sharable_$r=!append item $nei to $(sharable_$r)
43
      changed=1
44
    !endif
45
    !if $r notitemof $mksharable and $nei isitemof $(sharable_$r)
46
      !if $r isitemof $nsharing
47
        error=$error remote_sharing
48
      !else
49
        sharable_$r=!listcomplement $nei in $(sharable_$r)
50
        changed=1
51
      !endif
52
    !endif
53
  !next r
54
  !if $changed>0
55
    shlist=
56
    !for sh in $sharablelist
57
      shlist=!append item $(sharable_$sh) to $shlist
58
    !next sh
59
    sharable_all=!listuniq $shlist
60
    !read neighbor/writeneighbor.proc
23 reyssat 61
  !endif
62
!endif
63
 
64
!reset mksharable,changeshare
65
!for r in $sharablelist
12457 bpr 66
  !if $nei isitemof $(sharable_$r)
67
    mksharable=!append item $r to $mksharable
68
  !endif
23 reyssat 69
!next r