From 729c6b67aae0f2034c3c7c7c504c816ea77a683a Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 1 May 2020 15:18:48 +0000 Subject: [PATCH] the "term" field now is called "name", workaround removed --- mod/item.php | 2 +- src/Model/Tag.php | 13 +------------ view/templates/admin/item/source.tpl | 2 +- 3 files changed, 3 insertions(+), 14 deletions(-) diff --git a/mod/item.php b/mod/item.php index a41bb7c520..30b5f5aefa 100644 --- a/mod/item.php +++ b/mod/item.php @@ -1061,7 +1061,7 @@ function item_add_implicit_mentions(array $tags, array $thread_parent_contact, $ $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) { diff --git a/src/Model/Tag.php b/src/Model/Tag.php index 86c93efe8e..04107f804c 100644 --- a/src/Model/Tag.php +++ b/src/Model/Tag.php @@ -320,18 +320,7 @@ class Tag 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); } /** diff --git a/view/templates/admin/item/source.tpl b/view/templates/admin/item/source.tpl index 4f985cbdce..a681d8739f 100644 --- a/view/templates/admin/item/source.tpl +++ b/view/templates/admin/item/source.tpl @@ -45,7 +45,7 @@ {{if $term.type == 8}}Implicit Mention{{/if}} - {{$term.term}} + {{$term.name}} {{$term.url}} -- 2.39.5