[pLog-svn] r4057 - plog/branches/lifetype-1.1.1/class/summary/dao

oscar at devel.lifetype.net oscar at devel.lifetype.net
Wed Sep 27 19:15:30 GMT 2006


Author: oscar
Date: 2006-09-27 19:15:30 +0000 (Wed, 27 Sep 2006)
New Revision: 4057

Modified:
   plog/branches/lifetype-1.1.1/class/summary/dao/summarystats.class.php
Log:
fix for the list of posts not displaying the right contents


Modified: plog/branches/lifetype-1.1.1/class/summary/dao/summarystats.class.php
===================================================================
--- plog/branches/lifetype-1.1.1/class/summary/dao/summarystats.class.php	2006-09-27 19:10:52 UTC (rev 4056)
+++ plog/branches/lifetype-1.1.1/class/summary/dao/summarystats.class.php	2006-09-27 19:15:30 UTC (rev 4057)
@@ -277,10 +277,10 @@
 
 			$prefix = $this->getPrefix();
 
-			$query = "SELECT a.id as id, MAX(a.date) as date
+			$query = "SELECT a.id AS id
 					  FROM {$prefix}articles a, 
 					       {$prefix}blogs b
-					  WHERE a.date >= ".$this->_startTime." AND a.date <= ".$this->_now."
+					  WHERE a.date <= ".$this->_now."
 					        AND a.blog_id = b.id
 					        AND b.status = ".BLOG_STATUS_ACTIVE."
 					        AND a.status = ".POST_STATUS_PUBLISHED."
@@ -290,7 +290,7 @@
 			if($globaArticleCategoryId != ALL_GLOBAL_ARTICLE_CATEGORIES)
 				$query .= " AND a.global_category_id = '".Db::qstr($globaArticleCategoryId)."'";				
 
-			$query .= " GROUP BY a.blog_id ORDER BY a.date DESC";
+			$query .= " ORDER BY a.date DESC";
 
             $result = $this->Execute( $query, $page, $itemsPerPage );
             
@@ -314,10 +314,10 @@
 
 			$prefix = $this->getPrefix();
 
-			$query = "SELECT a.*
+			$query = "SELECT COUNT(*)
 					  FROM {$prefix}articles a, 
 					       {$prefix}blogs b
-					  WHERE a.date >= ".$this->_startTime." AND a.date <= ".$this->_now."
+					  WHERE a.date <= ".$this->_now."
 					        AND a.blog_id = b.id
 					        AND b.status = ".BLOG_STATUS_ACTIVE."
 					        AND a.status = ".POST_STATUS_PUBLISHED."



More information about the pLog-svn mailing list