create URL for categories

This commit is contained in:
Tobias Diekershoff 2019-11-03 16:34:58 +01:00
parent ebfedbc449
commit f45d39c05b

View file

@ -42,10 +42,16 @@ final class Item
$folders = [];
$first = true;
if (!empty($item['author-link'])) {
$url = $item['author-link'] . "?category=" . rawurlencode($savedFolderName);
} else {
$url = '#';
}
foreach (FileTag::fileToArray($item['file'] ?? '', 'category') as $savedFolderName) {
$categories[] = [
'name' => $savedFolderName,
'url' => "#",
'url' => $url,
'removeurl' => ((local_user() == $item['uid']) ? 'filerm/' . $item['id'] . '?f=&cat=' . rawurlencode($savedFolderName) : ""),
'first' => $first,
'last' => false