Commit f574876f authored by profix898's avatar profix898

- task: improved album selector (multi-level selector)

parent ad920d32
......@@ -710,12 +710,12 @@ function _gallery_settings_album_select($title, $value, $description, $root = NU
/**
* Function _gallery_settings_album_traverse().
*/
function _gallery_settings_album_traverse(&$tree, &$items) {
function _gallery_settings_album_traverse(&$tree, &$items, $indent = '') {
foreach (array_keys($tree) as $id) {
$album = gallery_item_details($id);
$items[$id] = $album['title'];
$items[$id] = (empty($indent) ? '' : $indent .' ') . $album['title'];
if (count($tree[$id])) {
_gallery_settings_album_traverse($tree[$id], $items);
_gallery_settings_album_traverse($tree[$id], $items, $indent .'--');
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment