mirror of
https://github.com/friendica/friendica
synced 2025-04-26 06:30:11 +00:00
The old tag handling is removed
This commit is contained in:
parent
92cf4879e5
commit
b0cb6536dd
14 changed files with 40 additions and 543 deletions
|
@ -1080,21 +1080,15 @@ class DFRN
|
|||
$entry->appendChild($actarg);
|
||||
}
|
||||
|
||||
$tags = Item::getFeedTags($item);
|
||||
$tags = Tag::getByURIId($item['uri-id']);
|
||||
|
||||
/// @TODO Combine this with similar below if() block?
|
||||
if (count($tags)) {
|
||||
foreach ($tags as $t) {
|
||||
if (($type != 'html') || ($t[0] != "@")) {
|
||||
XML::addElement($doc, $entry, "category", "", ["scheme" => "X-DFRN:".$t[0].":".$t[1], "term" => $t[2]]);
|
||||
foreach ($tags as $tag) {
|
||||
if (($type != 'html') || ($tag['type'] == Tag::HASHTAG)) {
|
||||
XML::addElement($doc, $entry, "category", "", ["scheme" => "X-DFRN:" . Tag::TAG_CHARACTER[$tag['type']] . ":" . $tag['url'], "term" => $tag['name']]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (count($tags)) {
|
||||
foreach ($tags as $t) {
|
||||
if ($t[0] == "@") {
|
||||
$mentioned[$t[1]] = $t[1];
|
||||
if ($tag['type'] != Tag::HASHTAG) {
|
||||
$mentioned[$tag['url']] = $tag['url'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2238,11 +2232,6 @@ class DFRN
|
|||
// extract tag, if not duplicate, add to parent item
|
||||
if ($xo->content) {
|
||||
Tag::store($item_tag['uri-id'], Tag::HASHTAG, $xo->content);
|
||||
|
||||
if (!stristr($item_tag["tag"], trim($xo->content))) {
|
||||
$tag = $item_tag["tag"] . (strlen($item_tag["tag"]) ? ',' : '') . '#[url=' . $xo->id . ']'. $xo->content . '[/url]';
|
||||
Item::update(['tag' => $tag], ['id' => $item_tag["id"]]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2440,17 +2429,7 @@ class DFRN
|
|||
if (($term != "") && ($scheme != "")) {
|
||||
$parts = explode(":", $scheme);
|
||||
if ((count($parts) >= 4) && (array_shift($parts) == "X-DFRN")) {
|
||||
$termhash = array_shift($parts);
|
||||
$termurl = implode(":", $parts);
|
||||
|
||||
if (!empty($item["tag"])) {
|
||||
$item["tag"] .= ",";
|
||||
} else {
|
||||
$item["tag"] = "";
|
||||
}
|
||||
|
||||
$item["tag"] .= $termhash . "[url=" . $termurl . "]" . $term . "[/url]";
|
||||
|
||||
Tag::store($item['uri-id'], Tag::IMPLICIT_MENTION, $term, $termurl);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue