[pLog-svn] r3232 - plog/trunk/class/summary/dao
mark at devel.lifetype.net
mark at devel.lifetype.net
Tue Apr 11 15:47:46 GMT 2006
Author: mark
Date: 2006-04-11 15:47:45 +0000 (Tue, 11 Apr 2006)
New Revision: 3232
Modified:
plog/trunk/class/summary/dao/summarystats.class.php
Log:
Fix the bug of getRecentPostsByGlobalCategory(). Now, it should return the correct recent post array.
Modified: plog/trunk/class/summary/dao/summarystats.class.php
===================================================================
--- plog/trunk/class/summary/dao/summarystats.class.php 2006-04-11 13:00:08 UTC (rev 3231)
+++ plog/trunk/class/summary/dao/summarystats.class.php 2006-04-11 15:47:45 UTC (rev 3232)
@@ -292,7 +292,7 @@
$date = $t->getTimestamp();
$prefix = $this->getPrefix();
- $query = "SELECT a.*
+ $query = "SELECT a.id as id, MAX(a.date) as date
FROM {$prefix}articles a,
{$prefix}blogs b
WHERE a.date >= ".$this->_sevenDaysAgo." AND a.date <= ".$this->_now."
@@ -314,7 +314,8 @@
$posts = Array();
$articles = new Articles();
while( $row = $result->FetchRow() ) {
- array_push( $posts, $articles->mapRow($row) );
+ array_push( $posts, $articles->getArticle($row["id"]) );
+ echo $row["id"]."-".$row["date"];
}
$result->Close();
More information about the pLog-svn
mailing list