[pLog-svn] r3170 - plugins/trunk/topcommentposts
jondaley at devel.lifetype.net
jondaley at devel.lifetype.net
Fri Mar 31 13:50:46 GMT 2006
Author: jondaley
Date: 2006-03-31 13:50:46 +0000 (Fri, 31 Mar 2006)
New Revision: 3170
Modified:
plugins/trunk/topcommentposts/plugintopcommentposts.class.php
Log:
topcommentposts were counting spam comments
Modified: plugins/trunk/topcommentposts/plugintopcommentposts.class.php
===================================================================
--- plugins/trunk/topcommentposts/plugintopcommentposts.class.php 2006-03-31 08:07:56 UTC (rev 3169)
+++ plugins/trunk/topcommentposts/plugintopcommentposts.class.php 2006-03-31 13:50:46 UTC (rev 3170)
@@ -63,12 +63,12 @@
if ($based == 'BLOG') {
$query = "SELECT ".$this->prefix."articles_comments.article_id,count(".$this->prefix."articles_comments.article_id) as comment_count";
$query .= " FROM ".$this->prefix."articles_comments, ".$this->prefix."articles";
- $query .= " WHERE ".$this->prefix."articles_comments.article_id = ".$this->prefix."articles.id AND ".$this->prefix."articles.blog_id = ".$blogId." AND ".$this->prefix."articles.status = 1";
+ $query .= " WHERE ".$this->prefix."articles_comments.article_id = ".$this->prefix."articles.id AND ".$this->prefix."articles.blog_id = ".$blogId." AND ".$this->prefix."articles.status = 1 AND ".$this->prefix."articles_comments.status = 0";
$query .= " GROUP BY ".$this->prefix."articles_comments.article_id ORDER BY comment_count DESC";
} elseif ($based == 'SITE') {
$query = "SELECT ".$this->prefix."articles_comments.article_id,count(".$this->prefix."articles_comments.article_id) as comment_count";
$query .= " FROM ".$this->prefix."articles_comments, ".$this->prefix."articles";
- $query .= " WHERE ".$this->prefix."articles_comments.article_id = ".$this->prefix."articles.id AND ".$this->prefix."articles.status = 1";
+ $query .= " WHERE ".$this->prefix."articles_comments.article_id = ".$this->prefix."articles.id AND ".$this->prefix."articles.status = 1 AND ".$this->prefix."articles_comments.status = 0";
$query .= " GROUP BY ".$this->prefix."articles_comments.article_id ORDER BY comment_count DESC";
} else {
return false;
More information about the pLog-svn
mailing list