$parent_terms = Tag::getByURIId($thread_parent_uriid, [Tag::MENTION, Tag::IMPLICIT_MENTION]);
foreach ($parent_terms as $parent_term) {
- $implicit_mentions[$parent_term['url']] = $parent_term['term'];
+ $implicit_mentions[$parent_term['url']] = $parent_term['name'];
}
foreach ($implicit_mentions as $url => $label) {
public static function getByURIId(int $uri_id, array $type = [self::HASHTAG, self::MENTION, self::IMPLICIT_MENTION, self::EXCLUSIVE_MENTION])
{
$condition = ['uri-id' => $uri_id, 'type' => $type];
- $tags = DBA::select('tag-view', ['type', 'name', 'url'], $condition);
- if (!DBA::isResult($tags)) {
- return [];
- }
-
- $tag_list = [];
- while ($tag = DBA::fetch($tags)) {
- $tag['term'] = $tag['name']; /// @todo Remove this line when all occurrences of "term" had been replaced with "name"
- $tag_list[] = $tag;
- }
-
- return $tag_list;
+ return DBA::selectToArray('tag-view', ['type', 'name', 'url'], $condition);
}
/**