aboutsummaryrefslogtreecommitdiffstats
path: root/include/category_default.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/category_default.inc.php')
-rw-r--r--include/category_default.inc.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/category_default.inc.php b/include/category_default.inc.php
index 9ecc4bded..983ec66be 100644
--- a/include/category_default.inc.php
+++ b/include/category_default.inc.php
@@ -120,7 +120,9 @@ while ($row = mysql_fetch_array($result))
)
);
- if ($conf['show_comments'] and $user['show_nb_comments'])
+ if ($user['show_nb_comments']
+ and is_numeric($page['cat'])
+ and $page['cat_commentable'])
{
$query = '
SELECT COUNT(*) AS nb_comments