[pLog-svn] r4068 - plog/branches/lifetype-1.1.1/class/summary/dao
oscar at devel.lifetype.net
oscar at devel.lifetype.net
Fri Sep 29 09:38:57 GMT 2006
Author: oscar
Date: 2006-09-29 09:38:57 +0000 (Fri, 29 Sep 2006)
New Revision: 4068
Modified:
plog/branches/lifetype-1.1.1/class/summary/dao/summarystats.class.php
Log:
this change should use the data cache better
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-29 09:36:00 UTC (rev 4067)
+++ plog/branches/lifetype-1.1.1/class/summary/dao/summarystats.class.php 2006-09-29 09:38:57 UTC (rev 4068)
@@ -179,7 +179,7 @@
include_once( PLOG_CLASS_PATH."class/dao/blogs.class.php" );
$prefix = $this->getPrefix();
- $query = "SELECT COUNT(a.id) as t, SUM((num_reads / (TO_DAYS(NOW()) - TO_DAYS(a.date) + 1)) ) as rank, b.*
+ $query = "SELECT COUNT(a.id) as t, SUM((num_reads / (TO_DAYS(NOW()) - TO_DAYS(a.date) + 1)) ) as rank, b.id AS blog_id
FROM {$prefix}articles AS a
INNER JOIN {$prefix}blogs AS b
ON b.id = a.blog_id AND b.status = ".BLOG_STATUS_ACTIVE."
@@ -203,7 +203,7 @@
$blogs = Array();
$blogsDao = new Blogs();
while( $row = $result->FetchRow()) {
- $blog = $blogsDao->mapRow( $row );
+ $blog = $blogsDao->getBlogInfo( $row["blog_id"] );
$blogs[$blog->getId()] = $blog;
}
More information about the pLog-svn
mailing list