From 1e78225b0d669d369400de0aafe1f7dbf25b1d2a Mon Sep 17 00:00:00 2001 From: plegall Date: Mon, 14 Oct 2019 12:28:35 +0200 Subject: [PATCH] (cp e49c217) fixes #1099 avoid JS error when there is no album associated to current photo set --- admin/batch_manager_global.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/admin/batch_manager_global.php b/admin/batch_manager_global.php index 2dacd1182..de677f957 100644 --- a/admin/batch_manager_global.php +++ b/admin/batch_manager_global.php @@ -546,6 +546,8 @@ $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. +$associated_categories = array(); + if (count($page['cat_elements_id']) > 0) { $query = ' @@ -560,9 +562,11 @@ SELECT ) ;'; - $template->assign('associated_categories', query2array($query, 'id', 'id')); + $associated_categories = query2array($query, 'id', 'id'); } +$template->assign('associated_categories', $associated_categories); + if (count($page['cat_elements_id']) > 0) { // remove tags