[pLog-svn] r3141 - plog/trunk/class/dao
Mark Wu
markplace at gmail.com
Tue Mar 28 14:32:24 GMT 2006
A little bit weird, are you sure the blog_id is not in
plog_articles_comments.
I just check my installation, and the field "blog_id" is in
plog_articles_comments table.
Can you check it again?
mark
> -----Original Message-----
> From: plog-svn-bounces at devel.lifetype.net
> [mailto:plog-svn-bounces at devel.lifetype.net] On Behalf Of Jon Daley
> Sent: Tuesday, March 28, 2006 10:27 PM
> To: plog-svn at devel.lifetype.net
> Subject: Re: [pLog-svn] r3141 - plog/trunk/class/dao
>
> I also removed the $_blogSettings, as I believe it
> wasn't being used.
> Since blogSettings is a member variable, it is possible
> that we don't need to re-get it in mapRow, though I am not
> clear on the path that the code takes.
> Also, perhaps the blogId should be saved in a member
> variable, and then we wouldn't have to re-get it in mapRow?
>
> On Tue, 28 Mar 2006, jondaley at devel.lifetype.net wrote:
>
> > Author: jondaley
> > Date: 2006-03-28 13:50:51 +0000 (Tue, 28 Mar 2006) New
> Revision: 3141
> >
> > Modified:
> > plog/trunk/class/dao/commentscommon.class.php
> > Log:
> > fixes crash because blog_id isn't in the
> plog_articles_comments table, so it can't be gotten in
> mapRow. I am not sure how this worked at all. Note, I am
> now grabbing a blogInfo->_id, which at least should be
> changed to a getId() non-private function, but I am not sure
> I have the right fix anyway?
> >
> > Modified: plog/trunk/class/dao/commentscommon.class.php
> > ===================================================================
> > --- plog/trunk/class/dao/commentscommon.class.php
> 2006-03-27 17:43:43 UTC (rev 3140)
> > +++ plog/trunk/class/dao/commentscommon.class.php
> 2006-03-28 13:50:51 UTC (rev 3141)
> > @@ -40,7 +40,7 @@
> > class CommentsCommon extends Model
> > {
> >
> > - var $_blogSettings;
> > +// var $_blogSettings;
> > var $blogSettings;
> > var $timeDiff;
> >
> > @@ -461,16 +461,18 @@
> > $prefix = $this->getPrefix();
> > $date = $row["date"];
> > $articleId = $row["article_id"];
> > - $blogId = $row["blog_id"];
> > -
> > - $blogs = new Blogs();
> > - $blogInfo = $blogs->getBlogInfo( $blogId );
> > - $blogSettings = $blogInfo->getSettings();
> > +
> > + // load the post to get the
> blog in order to get the time difference
> > + $articles = new Articles();
> > + $article = $articles->getArticle( $row["article_id"]);
> > + $blog = $article->getBlogInfo();
> > + $blogSettings = $blog->getSettings();
> > +
> > $timeDiff = $blogSettings->getValue( "time_offset" );
> > $date = Timestamp::getDateWithOffset( $date,
> $timeDiff );
> >
> > $comment = new UserComment( $row["article_id"],
> > - $row['blog_id'],
> > + $blog->_id,
> >
> $row["parent_id"],
> > $row["topic"],
> > $row["text"],
> >
> > _______________________________________________
> > pLog-svn mailing list
> > pLog-svn at devel.lifetype.net
> > http://devel.lifetype.net/mailman/listinfo/plog-svn
> >
>
> **************************************
> Jon Daley
> http://jon.limedaley.com/
>
> Design documents are simply a communist plot attempting to
> undermine the productivity of the American worker.
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.lifetype.net
> http://devel.lifetype.net/mailman/listinfo/plog-svn
More information about the pLog-svn
mailing list