[pLog-svn] r583 - plog/trunk/class/action

oscar at devel.plogworld.net oscar at devel.plogworld.net
Mon Dec 27 21:34:16 GMT 2004


Author: oscar
Date: 2004-12-27 21:34:16 +0000 (Mon, 27 Dec 2004)
New Revision: 583

Modified:
   plog/trunk/class/action/blogaction.class.php
Log:
fixed a bug in the logic that gets the blog id of the blog that we're going to show


Modified: plog/trunk/class/action/blogaction.class.php
===================================================================
--- plog/trunk/class/action/blogaction.class.php	2004-12-27 13:39:05 UTC (rev 582)
+++ plog/trunk/class/action/blogaction.class.php	2004-12-27 21:34:16 UTC (rev 583)
@@ -124,9 +124,7 @@
          * almost everywhere.
          */
         function _getBlogInfo()
-        {
-        	$blogId = $this->_config->getValue('default_blog_id');
-			
+        {	
 			// see if we're using subdomains
 			$config =& Config::getConfig();
 			if( $config->getValue( "subdomains_enabled" )) {
@@ -144,14 +142,14 @@
 				$this->log->debug($result);
 			}
 
-		$blogId = $this->_request->getValue( 'blogId' );
-		$blogName = $this->_request->getValue( 'blogName' );
-		$userId = $this->_request->getValue( 'userId' );
-		$userName = $this->_request->getValue( 'userName' );
+    		$blogId = $this->_request->getValue( 'blogId' );
+    		$blogName = $this->_request->getValue( 'blogName' );
+    		$userId = $this->_request->getValue( 'userId' );
+    		$userName = $this->_request->getValue( 'userName' );
 			
             // if there is a "blogId" parameter, it takes precedence over the
             // "user" parameter.
-	    if( !$blogId && !$blogName ) {
+            if( !$blogId && !$blogName ) {
             	// check if there was a user parameter
                 if( $userParam ) {
                 	// if so, check to which blogs the user belongs
@@ -172,6 +170,10 @@
                     if( $this->_session->getValue('blogId') != '' ) {
                     	$blogId = $this->_session->getValue('blogId');
                     }
+                    else {
+                        // get the default blog id from the database
+                        $blogId = $this->_config->getValue('default_blog_id');                        
+                    }
                 }
             }
 			




More information about the pLog-svn mailing list