[pLog-svn] r3520 - plog/trunk/class/dao

oscar at devel.lifetype.net oscar at devel.lifetype.net
Sat Jun 3 20:34:44 GMT 2006


Author: oscar
Date: 2006-06-03 20:34:44 +0000 (Sat, 03 Jun 2006)
New Revision: 3520

Modified:
   plog/trunk/class/dao/articles.class.php
Log:
fixed another potential issue with dates


Modified: plog/trunk/class/dao/articles.class.php
===================================================================
--- plog/trunk/class/dao/articles.class.php	2006-06-03 07:48:35 UTC (rev 3519)
+++ plog/trunk/class/dao/articles.class.php	2006-06-03 20:34:44 UTC (rev 3520)
@@ -256,13 +256,13 @@
 					return false;
 			}
 			if( $date != -1 && $maxDate == 0 ) {
-				$postDate = substr($article->getDate(),0,strlen($date));
+				$postDate = substr($article->getTimestamp(),0,strlen($date));
 				if( $postDate != $date ) {
 					return false;
-				}
+				}				
 			}
 			elseif( $maxDate > 0 && $date != -1 ) {
-				$postDate = substr($article->getDate(),0,strlen($maxDate));
+				$postDate = substr($article->getTimestamp(),0,strlen($maxDate));
                 // we need to check both ends of the range
 				if( $postDate >= $maxDate || $postDate <= $date) {
 					return false;					
@@ -391,8 +391,8 @@
                 $query .= " GROUP BY a.id ";
                 
             return $query;
-		}		
-
+		}
+		
         /**
          * Returns all the articles for a given blog, according to the conditions specified in 
          * the call. If this function is too cumbersome to use (I reckon it might be, 
@@ -782,7 +782,7 @@
                 }
                 $newArticle->setPostSlug($slug);
             }
-            
+
             include_once( PLOG_CLASS_PATH.'class/dao/customfields/customfields.class.php' );
             include_once( PLOG_CLASS_PATH."class/dao/blogs.class.php" );
             
@@ -792,7 +792,7 @@
             	return false;
 				
 			$this->addArticleText( $newArticle );
-
+			
             // and create the link between the post and its categories
             $this->addPostCategoriesLink( $newArticle );
 			



More information about the pLog-svn mailing list