mirror of
https://github.com/friendica/friendica
synced 2025-04-26 21:50:11 +00:00
Removed legacy usage of the "tag" field
This commit is contained in:
parent
f7a45e4153
commit
980de37047
3 changed files with 24 additions and 5 deletions
|
@ -339,6 +339,23 @@ class Tag
|
|||
return DBA::selectToArray('tag-view', ['type', 'name', 'url'], $condition);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a string with all tags and mentions
|
||||
*
|
||||
* @param integer $uri_id
|
||||
* @return string tags and mentions
|
||||
*/
|
||||
public static function tagTextFromItemId(int $uri_id)
|
||||
{
|
||||
$tag_list = [];
|
||||
$tags = self::getByURIId($uri_id);
|
||||
foreach ($tags as $tag) {
|
||||
$tag_list[] = self::TAG_CHARACTER[$tag['type']] . '[url=' . $tag['url'] . ']' . $tag['name'] . '[/url]';
|
||||
}
|
||||
|
||||
return implode(',', $tag_list);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sorts an item's tags into mentions, hashtags and other tags. Generate personalized URLs by user and modify the
|
||||
* provided item's body with them.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue