From f45d39c05ba54b1414bd6387eca046a004764133 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sun, 3 Nov 2019 16:34:58 +0100 Subject: [PATCH] create URL for categories --- src/Content/Item.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Content/Item.php b/src/Content/Item.php index ed6ec9c877..f086fbe19c 100644 --- a/src/Content/Item.php +++ b/src/Content/Item.php @@ -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 -- 2.39.5