aboutsummaryrefslogtreecommitdiffstats
path: root/admin.php
diff options
context:
space:
mode:
Diffstat (limited to 'admin.php')
-rw-r--r--admin.php15
1 files changed, 14 insertions, 1 deletions
diff --git a/admin.php b/admin.php
index 0d840b591..de3d9a90e 100644
--- a/admin.php
+++ b/admin.php
@@ -206,7 +206,20 @@ $template->assign(
if ($conf['activate_comments'])
{
- $template->assign('U_PENDING_COMMENTS', $link_start.'comments');
+ $template->assign('U_COMMENTS', $link_start.'comments');
+
+ // pending comments
+ $query = '
+SELECT COUNT(*)
+ FROM '.COMMENTS_TABLE.'
+ WHERE validated=\'false\'
+;';
+ list($nb_comments) = pwg_db_fetch_row(pwg_query($query));
+
+ if ($nb_comments > 0)
+ {
+ $template->assign('NB_PENDING_COMMENTS', $nb_comments);
+ }
}
// any photo in the caddie?