fix entry count, thanks to chris from the forums
authorgarvinhicking <garvinhicking>
Mon, 31 Oct 2005 18:12:33 +0000 (18:12 +0000)
committergarvinhicking <garvinhicking>
Mon, 31 Oct 2005 18:12:33 +0000 (18:12 +0000)
docs/NEWS
include/plugin_internal.inc.php

index 244e96b8a2fb4f017c27911f4b566cb99835c52b..2c5f77486724f6f51fbfa70933164d937ba99251 100644 (file)
--- a/docs/NEWS
+++ b/docs/NEWS
@@ -3,6 +3,9 @@
 Version 0.9.1 ()
 ------------------------------------------------------------------------
 
+    * Fix incorrect entry count in categories sidebar plugin (was also
+      counting drafts)
+
     * Set the correct reply-to name when sending comment mails, thanks
       to RobA from the forums (garvinhicking)
 
index c81f7197fc19d9b1fcee07840e321cee4de6a0b5..34f10cb3c39f4a9199d73a0e2cc0872ba4d93d31 100644 (file)
@@ -1313,7 +1313,7 @@ class serendipity_categories_plugin extends serendipity_plugin {
                                             FROM {$serendipity['dbPrefix']}entrycat ec,
                                                  {$serendipity['dbPrefix']}category c,
                                                  {$serendipity['dbPrefix']}entries e
-                                            WHERE ec.categoryid = c.categoryid AND ec.entryid = e.id
+                                            WHERE ec.categoryid = c.categoryid AND ec.entryid = e.id AND e.isdraft = 'false'
                                             GROUP BY c.categoryid, c.category_name
                                             ORDER BY postings DESC";
             $category_rows  = serendipity_db_query($cat_sql);