]> git.mxchange.org Git - friendica.git/commitdiff
the "term" field now is called "name", workaround removed
authorMichael <heluecht@pirati.ca>
Fri, 1 May 2020 15:18:48 +0000 (15:18 +0000)
committerMichael <heluecht@pirati.ca>
Fri, 1 May 2020 15:18:48 +0000 (15:18 +0000)
mod/item.php
src/Model/Tag.php
view/templates/admin/item/source.tpl

index a41bb7c520269229fce8324c1073c7b0df054cc9..30b5f5aefa472541d9ffa6d108eb50dc990ae9b9 100644 (file)
@@ -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) {
index 86c93efe8e88a3cc9545fba15ca6dfbb2f5a23f2..04107f804c95222df02dd10bf8c868fbb9fb7d32 100644 (file)
@@ -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);
        }
 
        /**
index 4f985cbdceea78972c89d5c3e2ff1d56008ed386..a681d8739f41f626434dd43e58d4dac661d4334d 100644 (file)
@@ -45,7 +45,7 @@
                        {{if $term.type == 8}}Implicit Mention{{/if}}
                                        </td>
                                        <td>
-                                               {{$term.term}}
+                                               {{$term.name}}
                                        </td>
                                        <td>
                                                {{$term.url}}