]> git.mxchange.org Git - friendica.git/commitdiff
move link generation into the loop
authorTobias Diekershoff <tobias.diekershoff@gmx.net>
Sun, 3 Nov 2019 18:57:32 +0000 (19:57 +0100)
committerTobias Diekershoff <tobias.diekershoff@gmx.net>
Sun, 3 Nov 2019 18:57:32 +0000 (19:57 +0100)
src/Content/Item.php

index f086fbe19cc1b6e50706d052c948af35faa5150d..ea1baef180db2d91addf0ab7818555a1c52a753e 100644 (file)
@@ -42,13 +42,12 @@ 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) {
+                       if (!empty($item['author-link'])) {
+                               $url = $item['author-link'] . "?category=" . rawurlencode($savedFolderName);
+                       } else {
+                               $url = '#';
+                       }
                        $categories[] = [
                                'name' => $savedFolderName,
                                'url' => $url,