aboutsummaryrefslogtreecommitdiffstats
path: root/admin.php
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2012-07-25 11:43:35 +0000
committerplegall <plg@piwigo.org>2012-07-25 11:43:35 +0000
commitd60339d4b5dbaf145288b92e6407e7668566778b (patch)
tree8c710fe3208f9daf9a6da3810c79eda1d0389e16 /admin.php
parentb9c3d840c5a677eb6e63c9120e3d283528677adb (diff)
feature 2693 added: automatically show link to caddie if caddie not empty
git-svn-id: http://piwigo.org/svn/branches/2.4@17008 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin.php')
-rw-r--r--admin.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/admin.php b/admin.php
index 2a9f4cdd1..a27d4e72c 100644
--- a/admin.php
+++ b/admin.php
@@ -219,6 +219,24 @@ if ($conf['activate_comments'])
$template->assign('U_PENDING_COMMENTS', $link_start.'comments');
}
+// any photo in the caddie?
+$query = '
+SELECT COUNT(*)
+ FROM '.CADDIE_TABLE.'
+ WHERE user_id = '.$user['id'].'
+;';
+list($nb_photos_in_caddie) = pwg_db_fetch_row(pwg_query($query));
+
+if ($nb_photos_in_caddie > 0)
+{
+ $template->assign(
+ array(
+ 'NB_PHOTOS_IN_CADDIE' => $nb_photos_in_caddie,
+ 'U_CADDIE' => $link_start.'batch_manager&amp;cat=caddie',
+ )
+ );
+}
+
// +-----------------------------------------------------------------------+
// | Plugin menu |
// +-----------------------------------------------------------------------+