Subversion Repositories wimsdev

Rev

Rev 12821 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
33 reyssat 1
 
2
forumtest=!defof mb_readpolicy in wimshome/log/classes/$wims_class/forum/.def
3
!if $wims_user!=supervisor and $forumtest!=alluser
12821 bpr 4
  msgcnt=0
5
  !exit
33 reyssat 6
!endif
7
 
17506 guerimand 8
!if $wims_user=supervisor and ($wims_realuser=$empty or $wims_realuser=supervisor or $wims_realuser=SUPERVISOR)
12821 bpr 9
  deffile=wimshome/log/classes/$wims_class/supervisor
33 reyssat 10
!else
12821 bpr 11
  !if $wims_realuser!=$empty
12
    deffile=wimshome/log/classes/$wims_class/.users/$wims_realuser
13
  !else
14
    deffile=wimshome/log/classes/$wims_class/.users/$wims_user
15
  !endif
33 reyssat 16
!endif
17
 
18
newlim=10
19
user_lastmsg=!getdef user_lastmsg in $deffile
20
!default user_lastmsg=0
21
 
22
msgs=!record 0 of wimshome/log/classes/$wims_class/forum/.newlist
23
msgcnt=!linecnt $msgs
24
 
25
#msgcnt=0
26
 
27
!if $user_lastmsg=0
12821 bpr 28
  !if $msgcnt>$newlim
29
    newmsgcnt=> $newlim
30
  !else
31
    newmsgcnt=$msgcnt
32
  !endif
33
  !exit
33 reyssat 34
!endif
35
 
36
user_lastmonth=!char 1 to 6 of $user_lastmsg
37
!for n=$msgcnt to 1 step -1
12821 bpr 38
  l_=!line $n of $msgs
39
  !distribute words $l_ into w_,t_
40
  !if $w_<$user_lastmonth
41
    !break
33 reyssat 42
  !endif
12821 bpr 43
  L_=!record $t_ of wimshome/log/classes/$wims_class/forum/$w_/.msglist
44
  !distribute items $L_ into m_,d_,h_
45
  h_=!char 1,2,4,5,7,8 of $h_
46
  !if $user_lastmsg<=$w_$d_$h_
47
    !if $newmsgcnt>$newlim
48
      newmsgcnt=&gt; $newlim
49
      !exit
50
    !else
51
      !advance newmsgcnt
52
    !endif
53
  !endif
33 reyssat 54
!next n