[pLog-svn] r2663 - plog/branches/plog-1.0.2/class/dao
jondaley at devel.lifetype.net
jondaley at devel.lifetype.net
Wed Nov 30 16:56:54 GMT 2005
Author: jondaley
Date: 2005-11-30 16:56:53 +0000 (Wed, 30 Nov 2005)
New Revision: 2663
Modified:
plog/branches/plog-1.0.2/class/dao/articlecategories.class.php
Log:
now show categories with 0 posts, according to conversation re: rev 2590 on the svn list
Modified: plog/branches/plog-1.0.2/class/dao/articlecategories.class.php
===================================================================
--- plog/branches/plog-1.0.2/class/dao/articlecategories.class.php 2005-11-30 16:55:58 UTC (rev 2662)
+++ plog/branches/plog-1.0.2/class/dao/articlecategories.class.php 2005-11-30 16:56:53 UTC (rev 2663)
@@ -170,7 +170,8 @@
MAX(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 = '".Db::qstr($blogId)."' AND a.status = ".POST_STATUS_PUBLISHED;
+ WHERE c.blog_id = '".Db::qstr($blogId)."' AND
+ (a.id IS NULL OR a.status = ".POST_STATUS_PUBLISHED .")";
if( $onlyInMainPage )
$query .= " AND c.in_main_page = 1 ";
More information about the pLog-svn
mailing list