diff options
author | mistic100 <mistic@piwigo.org> | 2014-05-26 22:03:57 +0000 |
---|---|---|
committer | mistic100 <mistic@piwigo.org> | 2014-05-26 22:03:57 +0000 |
commit | a5b2cf82007ac1b2461ba86b79c48e43c2640053 (patch) | |
tree | 9cc97025f60101372081320a1fe9f56a8b69451e /admin/batch_manager_global.php | |
parent | b97c45b941170247107445ce4a8fffbae8267c1e (diff) |
feature 3077 : factorize code for categories cache (TODO for other collections) + fix incorrect categories list for dissociation
git-svn-id: http://piwigo.org/svn/trunk@28542 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | admin/batch_manager_global.php | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/admin/batch_manager_global.php b/admin/batch_manager_global.php index 6e65c462d..26e0e7660 100644 --- a/admin/batch_manager_global.php +++ b/admin/batch_manager_global.php @@ -519,30 +519,8 @@ SELECT } } -$template->assign( 'filter_category_selected', $selected_category); +$template->assign('filter_category_selected', $selected_category); -// Dissociate from a category : categories listed for dissociation can only -// represent virtual links. We can't create orphans. Links to physical -// categories can't be broken. -if (count($page['cat_elements_id']) > 0) -{ - $query = ' -SELECT - DISTINCT(category_id) AS id, - c.name, - c.uppercats, - c.global_rank - FROM '.IMAGE_CATEGORY_TABLE.' AS ic - JOIN '.CATEGORIES_TABLE.' AS c ON c.id = ic.category_id - JOIN '.IMAGES_TABLE.' AS i ON i.id = ic.image_id - WHERE ic.image_id IN ('.implode(',', $page['cat_elements_id']).') - AND ( - ic.category_id != i.storage_category_id - OR i.storage_category_id IS NULL - ) -;'; - display_select_cat_wrapper($query, array(), 'dissociate_options', true); -} if (count($page['cat_elements_id']) > 0) { |