[pLog-svn] r1210 - plog/trunk/class/summary/dao
oscar at devel.plogworld.net
oscar at devel.plogworld.net
Fri Feb 25 17:09:02 GMT 2005
Author: oscar
Date: 2005-02-25 17:09:01 +0000 (Fri, 25 Feb 2005)
New Revision: 1210
Modified:
plog/trunk/class/summary/dao/summarystats.class.php
Log:
one performance improvement and bugfix. The improvement removed a condition that wasn't really necessary... well it perhaps was but that query was really slow. The bugfix replaced one status string with the correct statuts code.
Modified: plog/trunk/class/summary/dao/summarystats.class.php
===================================================================
--- plog/trunk/class/summary/dao/summarystats.class.php 2005-02-25 14:43:12 UTC (rev 1209)
+++ plog/trunk/class/summary/dao/summarystats.class.php 2005-02-25 17:09:01 UTC (rev 1210)
@@ -44,11 +44,11 @@
c.status = ".COMMENT_STATUS_NONSPAM;
// ignore certain topics and/or certain texts
- if( $ignoreTopic != "" )
+ /*if( $ignoreTopic != "" )
$query .= " AND t.topic NOT LIKE '%".Db::qstr( $ignoreTopic )."%' ";
if( $ignoreText != "" )
- $query .= " AND t.text NOT LIKE '%".Db::qstr( $ignoreTopic )."%' ";
+ $query .= " AND t.text NOT LIKE '%".Db::qstr( $ignoreTopic )."%' ";*/
$query .= " GROUP BY c.article_id ORDER BY total_comments DESC ";
@@ -210,7 +210,7 @@
*/
function getBlogTotalPosts( $blogId )
{
- $query = "SELECT COUNT(*) as total FROM ".$this->getPrefix()."articles WHERE blog_id = $blogId AND status = 'published'";
+ $query = "SELECT COUNT(*) as total FROM ".$this->getPrefix()."articles WHERE blog_id = $blogId AND status = ".POST_STATUS_PUBLISHED;
$result = $this->_db->Execute( $query );
if (!$result)
More information about the pLog-svn
mailing list