related to #1614 replacing selectize in photo editor for related categories

This commit is contained in:
Matthieu Leproux
2022-03-08 16:56:31 +01:00
committed by Matthieu Leproux
parent 34fe0fc36f
commit 66bd06176c
9 changed files with 454 additions and 17 deletions

View File

@@ -357,6 +357,9 @@ SELECT category_id, uppercats
;';
$result = pwg_query($query);
$related_categories = array();
$related_categories_ids = array();
while ($row = pwg_db_fetch_assoc($result))
{
$name =
@@ -371,10 +374,14 @@ while ($row = pwg_db_fetch_assoc($result))
}
else
{
$template->append('related_categories', $name);
$related_categories[$row['category_id']] = $name;
$related_categories_ids[] = $row['category_id'];
}
}
$template->assign('related_categories', $related_categories);
$template->assign('related_categories_ids', $related_categories_ids);
// jump to link
//
// 1. find all linked categories that are reachable for the current user.