[pLog-svn] r2854 - in plog/trunk/class/dao: . userdata

oscar at devel.lifetype.net oscar at devel.lifetype.net
Thu Jan 26 17:01:59 GMT 2006


Author: oscar
Date: 2006-01-26 17:01:58 +0000 (Thu, 26 Jan 2006)
New Revision: 2854

Modified:
   plog/trunk/class/dao/articles.class.php
   plog/trunk/class/dao/bloginfo.class.php
   plog/trunk/class/dao/userdata/phpbb2userdataprovider.class.php
   plog/trunk/class/dao/userinfo.class.php
Log:
the phpbb2 integration should be working again


Modified: plog/trunk/class/dao/articles.class.php
===================================================================
--- plog/trunk/class/dao/articles.class.php	2006-01-26 16:53:45 UTC (rev 2853)
+++ plog/trunk/class/dao/articles.class.php	2006-01-26 17:01:58 UTC (rev 2854)
@@ -1158,7 +1158,11 @@
             $blogId        = $query_result['blog_id'];
             $blogInfo      = $blogs->getBlogInfo( $blogId );
 			$blogSettings  = $blogInfo->getSettings();
-            $timeDiff      = $blogSettings->getValue( 'time_offset' );
+			
+			if( $blogSettings )
+				$timeDiff = $blogSettings->getValue( 'time_offset' );
+			else
+				$timeDiff = 0;
 
             // we can use this auxiliary function to help us...
             $date = Timestamp::getDateWithOffset( $query_result['date'], $timeDiff );

Modified: plog/trunk/class/dao/bloginfo.class.php
===================================================================
--- plog/trunk/class/dao/bloginfo.class.php	2006-01-26 16:53:45 UTC (rev 2853)
+++ plog/trunk/class/dao/bloginfo.class.php	2006-01-26 17:01:58 UTC (rev 2854)
@@ -154,7 +154,6 @@
 
         function getSetting( $setting )
         {
-
             return $this->_settings->getValue( $setting );
         }
 

Modified: plog/trunk/class/dao/userdata/phpbb2userdataprovider.class.php
===================================================================
--- plog/trunk/class/dao/userdata/phpbb2userdataprovider.class.php	2006-01-26 16:53:45 UTC (rev 2853)
+++ plog/trunk/class/dao/userdata/phpbb2userdataprovider.class.php	2006-01-26 17:01:58 UTC (rev 2854)
@@ -129,8 +129,8 @@
 	        $row = $result->FetchRow();
 	        
 	        // fetch the user permissions
-	        $perms = new UserPermissions();
-	        $row["site_admin"] = $perms->isSiteAdmin( $userid );
+	        //$perms = new UserPermissions();
+	        //$row["site_admin"] = $perms->isSiteAdmin( $userid );
 	        
 	        return( $this->_mapUserInfoObject( $row ));
         }
@@ -146,7 +146,7 @@
 		    $blog = new BlogInfo( $row["user"],  // name of the new blog
 		       	                  $row["id"],  // id of the owner
 		           	              "",  // no about
-		            	          Array()); // no properties either
+		            	          ""); // no properties either
 		    $newBlogId = $blogs->addBlog( $blog );
 		     	    	     
             // add a default category and a default post            
@@ -188,15 +188,15 @@
 	        $row["id"] = $row["user_id"];   
 	        $row["status"] = ($row["user_active"] > 0) ? USER_STATUS_ACTIVE : USER_STATUS_DISABLED;
 	        
-	        $perms = new UserPermissions();
-	        $row["site_admin"] = $perms->isSiteAdmin( $row["user_id"] );
+	        //$perms = new UserPermissions();
+	        //$row["site_admin"] = $perms->isSiteAdmin( $row["user_id"] );
 	        
 	        	        
 	       	// does this phpbb user have a blog yet? If so, create one if the configuration
 	        // of the user data provider says so
 	        $providerConfig = $this->getProviderConfiguration();
 	        if( $providerConfig->getValue( "createBlogIfNotExisting" )) {
-		        $userInfo = BaseUserDataProvider::_mapUserInfoObject( $row, true );
+		        $userInfo = BaseUserDataProvider::mapRow( $row, true );
 		        // check if this user is assigned to any blog
 		        $userBlogs = $userInfo->getBlogs();
 		        $this->log->debug("phpbb: checking if user ".$row["user"]." has at least one blog..." );
@@ -210,7 +210,7 @@
 			}
 	        }
 	        else {
-		        $userInfo = BaseUserDataProvider::_mapUserInfoObject( $row );
+		        $userInfo = BaseUserDataProvider::mapRow( $row );
 	        }	        
 	        
 	        return( $userInfo );

Modified: plog/trunk/class/dao/userinfo.class.php
===================================================================
--- plog/trunk/class/dao/userinfo.class.php	2006-01-26 16:53:45 UTC (rev 2853)
+++ plog/trunk/class/dao/userinfo.class.php	2006-01-26 17:01:58 UTC (rev 2854)
@@ -93,7 +93,7 @@
 			if( $this->_blogs == null ) {
 				include_once( PLOG_CLASS_PATH."class/dao/users.class.php" );
 				$users = new Users();
-                $this->_blogs = $this->getUsersBlogs($userInfo->getId());
+                $this->_blogs = $users->getUsersBlogs($this->getId());
 			}
 			
 			return( $this->_blogs );



More information about the pLog-svn mailing list