aboutsummaryrefslogtreecommitdiffstats
path: root/admin.php
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2013-10-22 20:39:10 +0000
committerplegall <plg@piwigo.org>2013-10-22 20:39:10 +0000
commitfac62f863dceea47f90027c9404604ec74c559d3 (patch)
tree3b014552b96aed3bac301aeef8fea9bf907a456c /admin.php
parentad6c3fd5661db2aa5aa21f7c1e661576f202fd02 (diff)
feature 2920 added: change admin screen "pending comments" to "all comments".
Now the administrator can filter on "all" or "pending" with a single click. In the admin menu, we display the number of pending comments. git-svn-id: http://piwigo.org/svn/trunk@25084 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-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?