[pLog-svn] r2955 - plog/trunk/class/dao
oscar at devel.lifetype.net
oscar at devel.lifetype.net
Thu Feb 16 17:22:09 GMT 2006
Author: oscar
Date: 2006-02-16 17:22:08 +0000 (Thu, 16 Feb 2006)
New Revision: 2955
Modified:
plog/trunk/class/dao/articles.class.php
Log:
solved an issue related to permalinks with dates and time differences
Modified: plog/trunk/class/dao/articles.class.php
===================================================================
--- plog/trunk/class/dao/articles.class.php 2006-02-15 16:39:53 UTC (rev 2954)
+++ plog/trunk/class/dao/articles.class.php 2006-02-16 17:22:08 UTC (rev 2955)
@@ -134,7 +134,8 @@
$date = -1,
$categoryId = -1,
$userId = -1,
- $status = POST_STATUS_PUBLISHED )
+ $status = POST_STATUS_PUBLISHED,
+ $maxDate = -1 )
{
// load all the articles with the same title
$articles = $this->getMany( "slug",
@@ -327,12 +328,12 @@
if( $article->getUserId() != $userId )
return false;
}
- if( $date > -1 ) {
+ if( $date != -1 && $maxDate == 0 ) {
$postDate = substr($article->getDate(),0,strlen($date));
if( $postDate != $date )
return false;
}
- if( $maxDate > 0 ) {
+ elseif( $maxDate != 0 && $date != -1 ) {
$postDate = substr($article->getDate(),0,strlen($maxDate));
if( $postDate > $maxDate )
return false;
More information about the pLog-svn
mailing list