From: garvinhicking Date: Mon, 10 Apr 2006 07:39:29 +0000 (+0000) Subject: Fix counting entries per category when they are outside the time scope. X-Git-Tag: 1.0~55 X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=d875ccaee4e6c0ff0e32bd3b8721d1702d7c54d6;p=s9y.git Fix counting entries per category when they are outside the time scope. Thanks to Machiavelli from the Forums! --- diff --git a/include/plugin_internal.inc.php b/include/plugin_internal.inc.php index d6e8793..3871d4f 100644 --- a/include/plugin_internal.inc.php +++ b/include/plugin_internal.inc.php @@ -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);