[pLog-svn] r4570 - plog/branches/lifetype-1.1.5/class/dao
BalearWeb
balearweb at balearweb.com
Thu Jan 25 08:23:46 GMT 2007
Hello,
Is this related to http://bugs.lifetype.net/view.php?id=1061 ?
Is the 'last_update' field in the lt_blogs still keeping track of when
was the last time the blog settings were updated, or now it reports the
date of the last article?
Thank you
Elena
oscar at devel.lifetype.net wrote:
> 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