[pLog-svn] r3229 - in plog/trunk/class: action/admin dao/userdata

mark at devel.lifetype.net mark at devel.lifetype.net
Tue Apr 11 10:02:41 GMT 2006


Author: mark
Date: 2006-04-11 10:02:41 +0000 (Tue, 11 Apr 2006)
New Revision: 3229

Modified:
   plog/trunk/class/action/admin/adminloginaction.class.php
   plog/trunk/class/dao/userdata/baseuserdataprovider.class.php
Log:
Sort the userBlogs, so we can use $userBlogs[0] to get the users' first blog.

Modified: plog/trunk/class/action/admin/adminloginaction.class.php
===================================================================
--- plog/trunk/class/action/admin/adminloginaction.class.php	2006-04-11 09:49:48 UTC (rev 3228)
+++ plog/trunk/class/action/admin/adminloginaction.class.php	2006-04-11 10:02:41 UTC (rev 3229)
@@ -109,7 +109,7 @@
 			// check if we are skipping the dashboard
 			if( $this->_config->getValue( "skip_dashboard" )) {
 				// get the first blog that came
-				$this->_blogInfo = end( $userBlogs );
+				$this->_blogInfo = $userBlogs[0];
 				// set it in the session
             	$session = HttpVars::getSession();
             	$sessionInfo->setValue( "blogInfo", $this->_blogInfo );

Modified: plog/trunk/class/dao/userdata/baseuserdataprovider.class.php
===================================================================
--- plog/trunk/class/dao/userdata/baseuserdataprovider.class.php	2006-04-11 09:49:48 UTC (rev 3228)
+++ plog/trunk/class/dao/userdata/baseuserdataprovider.class.php	2006-04-11 10:02:41 UTC (rev 3229)
@@ -130,6 +130,8 @@
                 $usersBlogs[] = $blogs->mapRow( $row );
             }
 
+            sort($usersBlogs);
+            
             return $usersBlogs;
         }
         



More information about the pLog-svn mailing list