[pLog-svn] r2979 - plog/trunk/class/action/admin

oscar at devel.lifetype.net oscar at devel.lifetype.net
Wed Feb 22 17:13:27 GMT 2006


Author: oscar
Date: 2006-02-22 17:13:27 +0000 (Wed, 22 Feb 2006)
New Revision: 2979

Modified:
   plog/trunk/class/action/admin/adminaction.class.php
Log:
Now the current blog being edited by an admin is also displayed in the drop-down list that allows to quickly change to another blog.


Modified: plog/trunk/class/action/admin/adminaction.class.php
===================================================================
--- plog/trunk/class/action/admin/adminaction.class.php	2006-02-22 17:00:13 UTC (rev 2978)
+++ plog/trunk/class/action/admin/adminaction.class.php	2006-02-22 17:13:27 UTC (rev 2979)
@@ -81,6 +81,13 @@
 
 			$users =& new Users();
             $this->_userBlogs = $users->getUsersBlogs( $this->_userInfo->getId(), BLOG_STATUS_ACTIVE );            
+			// in case we're in "admin mode" (where administrators can log into anybody's blog), we should also
+			// display the current blog in the drop-down list on the top left corner, if only to make it clear to
+			// the user that this is another completely different blog
+			if( $this->_blogInfo->getOwnerId() != $this->_userInfo->getId() &&
+			    $this->_userInfo->isSiteAdmin()) {
+				$this->_userBlogs[] = $this->_blogInfo;
+			}
         }
 
         /**



More information about the pLog-svn mailing list