create URL for categories
This commit is contained in:
parent
ebfedbc449
commit
f45d39c05b
1 changed files with 7 additions and 1 deletions
|
@ -42,10 +42,16 @@ final class Item
|
||||||
$folders = [];
|
$folders = [];
|
||||||
$first = true;
|
$first = true;
|
||||||
|
|
||||||
|
if (!empty($item['author-link'])) {
|
||||||
|
$url = $item['author-link'] . "?category=" . rawurlencode($savedFolderName);
|
||||||
|
} else {
|
||||||
|
$url = '#';
|
||||||
|
}
|
||||||
|
|
||||||
foreach (FileTag::fileToArray($item['file'] ?? '', 'category') as $savedFolderName) {
|
foreach (FileTag::fileToArray($item['file'] ?? '', 'category') as $savedFolderName) {
|
||||||
$categories[] = [
|
$categories[] = [
|
||||||
'name' => $savedFolderName,
|
'name' => $savedFolderName,
|
||||||
'url' => "#",
|
'url' => $url,
|
||||||
'removeurl' => ((local_user() == $item['uid']) ? 'filerm/' . $item['id'] . '?f=&cat=' . rawurlencode($savedFolderName) : ""),
|
'removeurl' => ((local_user() == $item['uid']) ? 'filerm/' . $item['id'] . '?f=&cat=' . rawurlencode($savedFolderName) : ""),
|
||||||
'first' => $first,
|
'first' => $first,
|
||||||
'last' => false
|
'last' => false
|
||||||
|
|
Loading…
Reference in a new issue