[Isocial-svn] SF.net SVN: isocial: [55] app
Status: Pre-Alpha
Brought to you by:
aguidrevitch
From: <agu...@us...> - 2008-03-09 19:33:28
|
Revision: 55 http://isocial.svn.sourceforge.net/isocial/?rev=55&view=rev Author: aguidrevitch Date: 2008-03-09 12:33:31 -0700 (Sun, 09 Mar 2008) Log Message: ----------- unread message count simplified / speedup Modified Paths: -------------- app/controllers/message_controller.php Removed Paths: ------------- app/views/message/_count.tpl Modified: app/controllers/message_controller.php =================================================================== --- app/controllers/message_controller.php 2008-03-09 17:38:17 UTC (rev 54) +++ app/controllers/message_controller.php 2008-03-09 19:33:31 UTC (rev 55) @@ -115,8 +115,11 @@ } function inbox_count () { - $this->count = $this->Message->count('id', array('conditions' => array("recipient_id = ? AND is_read = 0", $this->current_user->getId()))); - return $this->render(array('partial' =>'count')); + if ($this->current_user) { + $count = $this->Message->count('id', array('conditions' => array("recipient_id = ? AND is_read = 0", $this->current_user->getId()))); + return $this->renderText($count); + } + return $this->renderNothing(); } function mark_unread () { Deleted: app/views/message/_count.tpl =================================================================== --- app/views/message/_count.tpl 2008-03-09 17:38:17 UTC (rev 54) +++ app/views/message/_count.tpl 2008-03-09 19:33:31 UTC (rev 55) @@ -1 +0,0 @@ -{count} \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |