mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-11 09:34:26 +02:00
We don't store tags in the item table anymore
This commit is contained in:
parent
0ab9f2e265
commit
5ba1427806
2 changed files with 24 additions and 8 deletions
|
@ -35,7 +35,7 @@ class Term
|
|||
return $tag_text;
|
||||
}
|
||||
|
||||
public static function insertFromTagFieldByItemId($itemid)
|
||||
public static function insertFromTagFieldByItemId($itemid, $tags)
|
||||
{
|
||||
$profile_base = System::baseUrl();
|
||||
$profile_data = parse_url($profile_base);
|
||||
|
@ -43,12 +43,14 @@ class Term
|
|||
$profile_base_friendica = $profile_data['host'] . $profile_path . '/profile/';
|
||||
$profile_base_diaspora = $profile_data['host'] . $profile_path . '/u/';
|
||||
|
||||
$fields = ['guid', 'uid', 'id', 'edited', 'deleted', 'created', 'received', 'title', 'body', 'tag', 'parent'];
|
||||
$fields = ['guid', 'uid', 'id', 'edited', 'deleted', 'created', 'received', 'title', 'body', 'parent'];
|
||||
$message = Item::selectFirst($fields, ['id' => $itemid]);
|
||||
if (!DBM::is_result($message)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$message['tag'] = $tags;
|
||||
|
||||
// Clean up all tags
|
||||
dba::delete('term', ['otype' => TERM_OBJ_POST, 'oid' => $itemid, 'type' => [TERM_HASHTAG, TERM_MENTION]]);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue