Merge pull request #13046 from MrPetovan/bug/12760-category-label-link
Fix link to user category in label
This commit is contained in:
commit
17d1236bdb
|
@ -96,12 +96,11 @@ class Item
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return array with details for categories and folders for an item
|
* Lists categories and folders for an item
|
||||||
*
|
*
|
||||||
* @param array $item
|
* @param array $item
|
||||||
* @param int $uid
|
* @param int $uid
|
||||||
* @return [array, array]
|
* @return array
|
||||||
*
|
|
||||||
* [
|
* [
|
||||||
* [ // categories array
|
* [ // categories array
|
||||||
* {
|
* {
|
||||||
|
@ -109,8 +108,8 @@ class Item
|
||||||
* 'removeurl': 'url to remove this category',
|
* 'removeurl': 'url to remove this category',
|
||||||
* 'first': 'is the first in this array? true/false',
|
* 'first': 'is the first in this array? true/false',
|
||||||
* 'last': 'is the last in this array? true/false',
|
* 'last': 'is the last in this array? true/false',
|
||||||
* } ,
|
* },
|
||||||
* ....
|
* ...
|
||||||
* ],
|
* ],
|
||||||
* [ //folders array
|
* [ //folders array
|
||||||
* {
|
* {
|
||||||
|
@ -119,9 +118,11 @@ class Item
|
||||||
* 'first': 'is the first in this array? true/false',
|
* 'first': 'is the first in this array? true/false',
|
||||||
* 'last': 'is the last in this array? true/false',
|
* 'last': 'is the last in this array? true/false',
|
||||||
* } ,
|
* } ,
|
||||||
* ....
|
* ...
|
||||||
* ]
|
* ]
|
||||||
* ]
|
* ]
|
||||||
|
*
|
||||||
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public function determineCategoriesTerms(array $item, int $uid = 0): array
|
public function determineCategoriesTerms(array $item, int $uid = 0): array
|
||||||
{
|
{
|
||||||
|
@ -135,9 +136,9 @@ class Item
|
||||||
return [$categories, $folders];
|
return [$categories, $folders];
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (Post\Category::getArrayByURIId($item['uri-id'], $uid, Post\Category::CATEGORY) as $savedFolderName) {
|
foreach (Post\Category::getArrayByURIId($item['uri-id'], $uid) as $savedFolderName) {
|
||||||
if (!empty($item['author-link'])) {
|
if (!empty($item['author-link'])) {
|
||||||
$url = $item['author-link'] . "?category=" . rawurlencode($savedFolderName);
|
$url = $item['author-link'] . '/conversations?category=' . rawurlencode($savedFolderName);
|
||||||
} else {
|
} else {
|
||||||
$url = '#';
|
$url = '#';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user