[pLog-svn] r4570 - plog/branches/lifetype-1.1.5/class/dao

oscar at devel.lifetype.net oscar at devel.lifetype.net
Wed Jan 24 20:29:32 GMT 2007


Author: oscar
Date: 2007-01-24 20:29:32 +0000 (Wed, 24 Jan 2007)
New Revision: 4570

Modified:
   plog/branches/lifetype-1.1.5/class/dao/articles.class.php
Log:
Somehow we forgot to update the last_update_date fields in the lt_blogs table

Modified: plog/branches/lifetype-1.1.5/class/dao/articles.class.php
===================================================================
--- plog/branches/lifetype-1.1.5/class/dao/articles.class.php	2007-01-24 17:25:17 UTC (rev 4569)
+++ plog/branches/lifetype-1.1.5/class/dao/articles.class.php	2007-01-24 20:29:32 UTC (rev 4570)
@@ -811,9 +811,11 @@
             
             // update the blog counters
             if( $newArticle->getStatus() == POST_STATUS_PUBLISHED ) {
+				include_once( PLOG_CLASS_PATH."class/data/timestamp.class.php" );	
 	            $blogs = new Blogs();
     	        $blogInfo = $newArticle->getBlogInfo();
         	    $blogInfo->setTotalPosts( $blogInfo->getTotalPosts() + 1 );
+				$blogInfo->setUpdateDate( Timestamp::getNowTimestamp());
             	$blogs->updateBlog( $blogInfo );
             }
 
@@ -969,15 +971,19 @@
 			}
 
 			// update the blog counter
-			if( $oldArticle->getStatus() == POST_STATUS_PUBLISHED && $article->getStatus() != POST_STATUS_PUBLISHED ) {            
+			if( $oldArticle->getStatus() == POST_STATUS_PUBLISHED && $article->getStatus() != POST_STATUS_PUBLISHED ) {
+				include_once( PLOG_CLASS_PATH."class/data/timestamp.class.php" );				
 		    	$blogs = new Blogs();
 	    	    $blogInfo = $article->getBlogInfo();
 	        	$blogInfo->setTotalPosts( $blogInfo->getTotalPosts() - 1 );
+				$blogInfo->setUpdateDate( Timestamp::getNowTimestamp());
 	            $blogs->updateBlog( $blogInfo );
 	        } elseif ( $oldArticle->getStatus() != POST_STATUS_PUBLISHED && $article->getStatus() == POST_STATUS_PUBLISHED ) {
+				include_once( PLOG_CLASS_PATH."class/data/timestamp.class.php" );		
 		    	$blogs = new Blogs();
 	    	    $blogInfo = $article->getBlogInfo();
 	        	$blogInfo->setTotalPosts( $blogInfo->getTotalPosts() + 1 );
+				$blogInfo->setUpdateDate( Timestamp::getNowTimestamp());	
 	            $blogs->updateBlog( $blogInfo );
 	    	}
 



More information about the pLog-svn mailing list