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

oscar at devel.lifetype.net oscar at devel.lifetype.net
Mon May 29 19:03:40 GMT 2006


Author: oscar
Date: 2006-05-29 19:03:39 +0000 (Mon, 29 May 2006)
New Revision: 3493

Modified:
   plog/trunk/class/dao/articles.class.php
Log:
fixed an issue with date ranges and permalinks


Modified: plog/trunk/class/dao/articles.class.php
===================================================================
--- plog/trunk/class/dao/articles.class.php	2006-05-29 17:13:27 UTC (rev 3492)
+++ plog/trunk/class/dao/articles.class.php	2006-05-29 19:03:39 UTC (rev 3493)
@@ -91,7 +91,6 @@
 			                            $articleTitle,
 										CACHE_ARTICLES_BYNAME,
                                                     Array( CACHE_ARTICLES => "getId" ));
-								
 			$found = false;
 			if($articles){
                 foreach( $articles as $article ) {
@@ -262,9 +261,10 @@
 					return false;
 				}
 			}
-			elseif( $maxDate > 0 && $date != -1 ) {			
+			elseif( $maxDate > 0 && $date != -1 ) {
 				$postDate = substr($article->getDate(),0,strlen($maxDate));
-				if( $postDate > $maxDate ) {
+                // we need to check both ends of the range
+				if( $postDate >= $maxDate || $postDate <= $date) {
 					return false;					
 				}
 			}



More information about the pLog-svn mailing list