[pLog-svn] r1036 - plog/trunk/class/dao

oscar at devel.plogworld.net oscar at devel.plogworld.net
Fri Feb 11 08:09:27 GMT 2005


Author: oscar
Date: 2005-02-11 08:09:27 +0000 (Fri, 11 Feb 2005)
New Revision: 1036

Modified:
   plog/trunk/class/dao/articlecategories.class.php
Log:
fixed an issue where if a category was assigned to only one article that was
in status 'draft' or 'deleted', the category would not be included in the listing. 


Modified: plog/trunk/class/dao/articlecategories.class.php
===================================================================
--- plog/trunk/class/dao/articlecategories.class.php	2005-02-11 07:42:30 UTC (rev 1035)
+++ plog/trunk/class/dao/articlecategories.class.php	2005-02-11 08:09:27 UTC (rev 1036)
@@ -162,7 +162,7 @@
 						  c.mangled_name AS mangled_name, IF(a.id IS NULL, 0, COUNT(*)) AS num_articles, a.date AS last_update 
 						  FROM {$prefix}articles_categories c LEFT JOIN {$prefix}article_categories_link l
 						  ON c.id=l.category_id LEFT JOIN {$prefix}articles a ON a.id = l.article_id 
-						  WHERE c.blog_id = $blogId AND (a.status = 1 OR a.status IS NULL)";
+						  WHERE c.blog_id = '".Db::qstr($blogId)."'";
 						  
 			if( $onlyInMainPage )
 				$query .= " AND c.in_main_page = 1 ";




More information about the pLog-svn mailing list