This repository was archived by the owner on Sep 10, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +29
-11
lines changed Expand file tree Collapse file tree 4 files changed +29
-11
lines changed Original file line number Diff line number Diff line change @@ -183,7 +183,14 @@ public function preDispatch()
183
183
$ this ->logged = false ;
184
184
}
185
185
186
- Zend_Registry::set ('userSession ' , $ user );
186
+ if (isset ($ user ))
187
+ {
188
+ Zend_Registry::set ('userSession ' , $ user );
189
+ }
190
+ else
191
+ {
192
+ Zend_Registry::set ('userSession ' , null );
193
+ }
187
194
188
195
$ this ->view ->lang = Zend_Registry::get ('configGlobal ' )->application ->lang ;
189
196
//create a global javascript json array
Original file line number Diff line number Diff line change @@ -92,6 +92,18 @@ function incrementViewCount($userDao)
92
92
{
93
93
throw new Zend_Exception ("Error param. " );
94
94
}
95
+ $ user = Zend_Registry::get ('userSession ' );
96
+ if (isset ($ user ))
97
+ {
98
+ if (isset ($ user ->viewedUsers [$ userDao ->getKey ()]))
99
+ {
100
+ return ;
101
+ }
102
+ else
103
+ {
104
+ $ user ->viewedUsers [$ userDao ->getKey ()] = true ;
105
+ }
106
+ }
95
107
$ userDao ->view ++;
96
108
$ this ->save ($ userDao );
97
109
}//end incrementViewCount
Original file line number Diff line number Diff line change @@ -44,6 +44,14 @@ function addUser($group, $user)
44
44
{
45
45
throw new Zend_Exception ("Should be an user. " );
46
46
}
47
+
48
+ $ community = $ group ->getCommunity ();
49
+ $ groupMember = $ community ->getMemberGroup ();
50
+ if ($ groupMember ->getKey () != $ group ->getKey ())
51
+ {
52
+ $ this ->addUser ($ groupMember , $ user );
53
+ }
54
+
47
55
$ this ->database ->link ('users ' , $ group , $ user );
48
56
} // end function addItem
49
57
Original file line number Diff line number Diff line change @@ -254,16 +254,7 @@ $this->headScript()->appendFile($this->coreWebroot.'/public/js/common/common.bro
254
254
echo "</ul> " ;
255
255
?>
256
256
</div>
257
-
258
- <div class="sideElementLast genericStats">
259
- <h1>Stats</h1>
260
-
261
- <?php
262
- echo "<ul> " ;
263
- echo " <li> " .count ($ this ->members )." {$ this ->t ("member " )}" .((count ($ this ->members )>1 )?'s ' :'' )."</li> " ;
264
- echo "</ul> " ;
265
- ?>
266
- </div>
257
+
267
258
268
259
<div class="sideElementFirst viewAction">
269
260
<h1>Actions</h1>
You can’t perform that action at this time.
0 commit comments