Merge pull request #7813 from tobiasd/20191103-cats

move link generation into the loop
pull/7814/head
Philipp 2019-11-03 20:26:14 +01:00 zatwierdzone przez GitHub
commit 4e6dcf537d
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 5 dodań i 6 usunięć

Wyświetl plik

@ -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,