mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-08-09 18:23:18 +02:00
fixes #1099 avoid JS error when there is no album associated to current photo set
This commit is contained in:
@@ -546,6 +546,8 @@ $template->assign('filter_category_selected', $selected_category);
|
|||||||
// Dissociate from a category : categories listed for dissociation can only
|
// Dissociate from a category : categories listed for dissociation can only
|
||||||
// represent virtual links. We can't create orphans. Links to physical
|
// represent virtual links. We can't create orphans. Links to physical
|
||||||
// categories can't be broken.
|
// categories can't be broken.
|
||||||
|
$associated_categories = array();
|
||||||
|
|
||||||
if (count($page['cat_elements_id']) > 0)
|
if (count($page['cat_elements_id']) > 0)
|
||||||
{
|
{
|
||||||
$query = '
|
$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)
|
if (count($page['cat_elements_id']) > 0)
|
||||||
{
|
{
|
||||||
// remove tags
|
// remove tags
|
||||||
|
|||||||
Reference in New Issue
Block a user