diff options
author | plegall <plg@piwigo.org> | 2012-07-25 11:45:08 +0000 |
---|---|---|
committer | plegall <plg@piwigo.org> | 2012-07-25 11:45:08 +0000 |
commit | 6c2fad0dd335898d8c56f982e369ed6f29d872b0 (patch) | |
tree | c4de8bbdaba7f174b51e487b87c2c08fa535b022 /admin.php | |
parent | ab924a14bd64f4fd2ede3febd76007ea43b9d91a (diff) |
merge r17008 from branch 2.4 to trunk
feature 2693 added: automatically show link to caddie if caddie not empty
git-svn-id: http://piwigo.org/svn/trunk@17009 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin.php')
-rw-r--r-- | admin.php | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -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&cat=caddie', + ) + ); +} + // +-----------------------------------------------------------------------+ // | Plugin menu | // +-----------------------------------------------------------------------+ |