]> git.mjollnir.org Git - s9y.git/commitdiff
Fix counting entries per category when they are outside the time scope.
authorgarvinhicking <garvinhicking>
Mon, 10 Apr 2006 07:39:29 +0000 (07:39 +0000)
committergarvinhicking <garvinhicking>
Mon, 10 Apr 2006 07:39:29 +0000 (07:39 +0000)
Thanks to Machiavelli from the Forums!

include/plugin_internal.inc.php

index d6e879307cdf48800e00e3ae39e6af462e158f61..3871d4f9d0cec85f4a9b3339f17b488e382e3c93 100644 (file)
@@ -1388,7 +1388,10 @@ 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 AND e.isdraft = 'false'
+                                            WHERE ec.categoryid = c.categoryid
+                                              AND ec.entryid = e.id
+                                              AND e.isdraft = 'false'
+                                                  " . (!serendipity_db_bool($serendipity['showFutureEntries']) ? " AND e.timestamp  <= " . time() : '') . "
                                             GROUP BY c.categoryid, c.category_name
                                             ORDER BY postings DESC";
             $category_rows  = serendipity_db_query($cat_sql);