[pLog-svn] r3651 - plog/trunk/class/summary/view

oscar at devel.lifetype.net oscar at devel.lifetype.net
Sun Jun 25 17:51:40 GMT 2006


Author: oscar
Date: 2006-06-25 17:51:39 +0000 (Sun, 25 Jun 2006)
New Revision: 3651

Modified:
   plog/trunk/class/summary/view/summaryuserlistview.class.php
Log:
fixed issue 968 (http://bugs.lifetype.net/view.php?id=968) -- pager for user list in summary.php not working correctly.


Modified: plog/trunk/class/summary/view/summaryuserlistview.class.php
===================================================================
--- plog/trunk/class/summary/view/summaryuserlistview.class.php	2006-06-25 17:42:42 UTC (rev 3650)
+++ plog/trunk/class/summary/view/summaryuserlistview.class.php	2006-06-25 17:51:39 UTC (rev 3651)
@@ -1,10 +1,6 @@
 <?php
 
 	include_once( PLOG_CLASS_PATH."class/summary/view/summarycachedview.class.php" );
-    include_once( PLOG_CLASS_PATH."class/summary/dao/summarystats.class.php" );	
-    include_once( PLOG_CLASS_PATH."class/dao/users.class.php" );
-    include_once( PLOG_CLASS_PATH."class/data/pager/pager.class.php" );
-    include_once( PLOG_CLASS_PATH."class/config/config.class.php" );
 	
 	/**
 	 * shows a paged list of users
@@ -19,11 +15,7 @@
 			$this->_page = $this->getCurrentPageFromRequest();		
 			
 			// and initialize the cached view
-			$this->SummaryCachedView( "userlist", $data );
-			
-			// items per page
-            $config =& Config::getConfig();
-			$this->_numUsersPerPage = $config->getValue( "summary_blogs_per_page", SUMMARY_DEFAULT_ITEMS_PER_PAGE );
+			$this->SummaryCachedView( "userlist", $data );			
 		}
 		
 		function render()
@@ -34,15 +26,25 @@
 				return true;
 			}
 			
+		    include_once( PLOG_CLASS_PATH."class/summary/dao/summarystats.class.php" );	
+		    include_once( PLOG_CLASS_PATH."class/dao/users.class.php" );
+		    include_once( PLOG_CLASS_PATH."class/data/pager/pager.class.php" );
+    		include_once( PLOG_CLASS_PATH."class/config/config.class.php" );						
+			
+			// items per page
+            $config =& Config::getConfig();
+			$this->_numUsersPerPage = $config->getValue( "summary_blogs_per_page", SUMMARY_DEFAULT_ITEMS_PER_PAGE );			
+			
 			// get the data itself
 			$users = new Users();
             $siteUsers = $users->getAllUsers( USER_STATUS_ACTIVE, "", $this->_page, $this->_numUsersPerPage );
-			$numUsers = count( $siteUsers );
 			
             if( !$siteUsers ) {
                 // if there was an error, show the error view
 				$siteUsers = Array();
             }
+
+			$numUsers = $users->getNumUsers( USER_STATUS_ACTIVE );
 			
 			// calculate the links to the different pages
 			$pager = new Pager( "?op=UserList&amp;page=",



More information about the pLog-svn mailing list