aboutsummaryrefslogtreecommitdiffstats
path: root/admin.php
diff options
context:
space:
mode:
Diffstat (limited to 'admin.php')
-rw-r--r--admin.php33
1 files changed, 21 insertions, 12 deletions
diff --git a/admin.php b/admin.php
index a49b45375..cf36ce516 100644
--- a/admin.php
+++ b/admin.php
@@ -2,7 +2,7 @@
// +-----------------------------------------------------------------------+
// | Piwigo - a PHP based photo gallery |
// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008-2013 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2008-2014 Piwigo Team http://piwigo.org |
// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
// +-----------------------------------------------------------------------+
@@ -103,7 +103,7 @@ $test_get = $_GET;
unset($test_get['page']);
unset($test_get['section']);
unset($test_get['tag']);
-if (count($test_get) == 0)
+if (count($test_get) == 0 and !empty($_SERVER['QUERY_STRING']))
{
$change_theme_url.= str_replace('&', '&', $_SERVER['QUERY_STRING']).'&';
}
@@ -189,7 +189,7 @@ $template->assign(
'U_CAT_OPTIONS'=> $link_start.'cat_options',
'U_CAT_UPDATE'=> $link_start.'site_update&site=1',
'U_RATING'=> $link_start.'rating',
- 'U_RECENT_SET'=> $link_start.'batch_manager&cat=recent',
+ 'U_RECENT_SET'=> $link_start.'batch_manager&filter=prefilter-last_import',
'U_BATCH'=> $link_start.'batch_manager',
'U_TAGS'=> $link_start.'tags',
'U_USERS'=> $link_start.'user_list',
@@ -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?
@@ -222,7 +235,7 @@ 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',
+ 'U_CADDIE' => $link_start.'batch_manager&filter=prefilter-caddie',
)
);
}
@@ -250,20 +263,16 @@ if (
array(
'site_manager', // delete site
'site_update', // ?only POST
- 'cat_list', // delete cat
- 'cat_move', // ?only POST
- 'cat_options', // ?only POST; public/private; lock/unlock
- 'user_perm',
- 'group_perm',
- 'group_list', // delete group
)
)
or ( !empty($_POST) and in_array($page['page'],
array(
- 'photo',
'album', // public/private; lock/unlock, permissions
+ 'cat_move',
+ 'cat_options', // public/private; lock/unlock
'batch_manager', // associate/dissociate; delete; set level
'user_list', // group assoc; user level
+ 'user_perm',
)
)
)