aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--admin.php13
-rw-r--r--admin/batch_manager_global.php9
2 files changed, 15 insertions, 7 deletions
diff --git a/admin.php b/admin.php
index a93570e43..19c1661ed 100644
--- a/admin.php
+++ b/admin.php
@@ -69,8 +69,10 @@ if (isset($_GET['change_theme']))
// +-----------------------------------------------------------------------+
// | synchronize user informations |
// +-----------------------------------------------------------------------+
-
-sync_users();
+if (mt_rand(0,9)==0)
+{
+ sync_users();
+}
// +-----------------------------------------------------------------------+
// | variables init |
@@ -197,7 +199,6 @@ if (
'cat_move', // ?only POST
'cat_options', // ?only POST; public/private; lock/unlock
'cat_perm', // ?only POST
- 'element_set', // ?only POST; associate/dissociate
'picture_modify', // ?only POST; associate/dissociate
'user_list', // ?only POST; group assoc
'user_perm',
@@ -205,6 +206,12 @@ if (
'group_list', // delete group
)
)
+ or ( isset($_POST) and in_array($page['page'],
+ array(
+ 'batch_manager', // associate/dissociate; delete; set level
+ )
+ )
+ )
)
{
invalidate_user_cache();
diff --git a/admin/batch_manager_global.php b/admin/batch_manager_global.php
index a95947cf7..6eb7150ac 100644
--- a/admin/batch_manager_global.php
+++ b/admin/batch_manager_global.php
@@ -412,14 +412,15 @@ if (count($page['cat_elements_id']) > 0)
{
$query = '
SELECT
- COUNT(*)
+ id
FROM '.IMAGES_TABLE.'
WHERE id IN ('.implode(',', $page['cat_elements_id']).')
- AND storage_category_id IS NULL
+ AND file NOT LIKE \'http%\'
+ LIMIT 1
;';
- list($counter) = pwg_db_fetch_row(pwg_query($query));
+ ;
- if ($counter > 0)
+ if ( pwg_db_fetch_row(pwg_query($query)) )
{
$template->assign('show_delete_form', true);
}