]> 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:27 +0000 (07:39 +0000)
committergarvinhicking <garvinhicking>
Mon, 10 Apr 2006 07:39:27 +0000 (07:39 +0000)
Thanks to Machiavelli from the Forums!

include/plugin_internal.inc.php

index 874931f8017aa4a0b4f881f509fe715cfbe2ffbe..f8c75104111ceecee5ee50fd52da36d207fc7561 100644 (file)
@@ -1397,7 +1397,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);