]> git.mjollnir.org Git - s9y.git/commitdiff
fix entry count, thanks to chris from the forums
authorgarvinhicking <garvinhicking>
Mon, 31 Oct 2005 18:12:51 +0000 (18:12 +0000)
committergarvinhicking <garvinhicking>
Mon, 31 Oct 2005 18:12:51 +0000 (18:12 +0000)
docs/NEWS
include/plugin_internal.inc.php

index 3cff25e9869d62070a28e831e977976399a3ce86..1c112f7f21b90c69c9ac99ef2d866d747889262c 100644 (file)
--- a/docs/NEWS
+++ b/docs/NEWS
@@ -6,6 +6,9 @@ Version 1.0 ()
 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);