X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=src%2FModel%2FTerm.php;h=9f0b595014bdaf245ab6c8f4f86cdbad4b3338e9;hb=4e44b07dfe07dde78fe8a095fbb43d9ec1ffcb53;hp=bed44d6857a0f66580ddb4e8d3ee20aa0a0c9d28;hpb=60dcdd0b277f50d2400add4fb02803af2edca2a2;p=friendica.git diff --git a/src/Model/Term.php b/src/Model/Term.php index bed44d6857..9f0b595014 100644 --- a/src/Model/Term.php +++ b/src/Model/Term.php @@ -5,9 +5,8 @@ namespace Friendica\Model; use Friendica\Core\System; +use Friendica\Database\dba; use Friendica\Database\DBM; -use Friendica\Model\Item; -use dba; require_once 'boot.php'; require_once 'include/conversation.php'; @@ -41,7 +40,11 @@ class Term $condition = ['otype' => TERM_OBJ_POST, 'oid' => $itemid, 'type' => [TERM_FILE, TERM_CATEGORY]]; $tags = dba::select('term', [], $condition); while ($tag = dba::fetch($tags)) { - $file_text .= '[' . $tag['term'] . ']'; + if ($tag['type'] == TERM_CATEGORY) { + $file_text .= '<' . $tag['term'] . '>'; + } else { + $file_text .= '[' . $tag['term'] . ']'; + } } return $file_text; } @@ -233,7 +236,9 @@ class Term $orig_tag = $tag["url"]; - $tag["url"] = Contact::magicLinkById($item['author-id'], $tag['url']); + $author = ['uid' => 0, 'id' => $item['author-id'], + 'network' => $item['author-network'], 'url' => $item['author-link']]; + $tag["url"] = Contact::magicLinkByContact($author, $tag['url']); if ($tag["type"] == TERM_HASHTAG) { if ($orig_tag != $tag["url"]) {