[pLog-svn] r4463 - plog/branches/lifetype-1.1.4/class/dao

oscar at devel.lifetype.net oscar at devel.lifetype.net
Mon Jan 1 17:51:46 GMT 2007


Author: oscar
Date: 2007-01-01 17:51:46 +0000 (Mon, 01 Jan 2007)
New Revision: 4463

Modified:
   plog/branches/lifetype-1.1.4/class/dao/commentscommon.class.php
Log:
Fixed an issue where time offsets would be applied twice to comments and trackbacks.

Modified: plog/branches/lifetype-1.1.4/class/dao/commentscommon.class.php
===================================================================
--- plog/branches/lifetype-1.1.4/class/dao/commentscommon.class.php	2007-01-01 17:03:49 UTC (rev 4462)
+++ plog/branches/lifetype-1.1.4/class/dao/commentscommon.class.php	2007-01-01 17:51:46 UTC (rev 4463)
@@ -137,8 +137,11 @@
 				include_once( PLOG_CLASS_PATH."class/data/timestamp.class.php" );
 				foreach( $comments as $comment ) {
 					if( $this->check( $comment, $type, $status )) {
-						$date = Timestamp::getDateWithOffset( $comment->getDate(), $timeDiff );
-						$comment->setDate( $date );
+						// WARNING (oscar 20070101)
+						// This isn't necessary as CommentsCommon::mapRow() is already applying the offset...
+						// otherwise what we're getting here is the same offset applied twice!
+						//$date = Timestamp::getDateWithOffset( $comment->getDate(), $timeDiff );
+						//$comment->setDate( $date );
 						$result[] = $comment;
 					}
 				}
@@ -540,6 +543,7 @@
             $blogInfo = $blogs->getBlogInfo( $blogId );
             $blogSettings = $blogInfo->getSettings();
             $timeDiff = $blogSettings->getValue( "time_offset" );
+			
             $date = Timestamp::getDateWithOffset( $date, $timeDiff );
 
         	$comment = new UserComment( $row["article_id"],



More information about the pLog-svn mailing list