mirror of
https://github.com/friendica/friendica
synced 2025-05-11 05:04:10 +02:00
We now store the tags in two separate tables
This commit is contained in:
parent
d3f4e4d629
commit
db657b0149
8 changed files with 121 additions and 98 deletions
|
@ -1840,20 +1840,7 @@ class Diaspora
|
|||
continue;
|
||||
}
|
||||
|
||||
$fields = ['uri-id' => $uriid, 'name' => substr($person['name'] ?: $person['nick'], 0, 64), 'url' => $person['url']];
|
||||
|
||||
if ($match[1] == Term::TAG_CHARACTER[Term::MENTION]) {
|
||||
$fields['type'] = Term::MENTION;
|
||||
} elseif ($match[1] == Term::TAG_CHARACTER[Term::EXCLUSIVE_MENTION]) {
|
||||
$fields['type'] = Term::EXCLUSIVE_MENTION;
|
||||
} elseif ($match[1] == Term::TAG_CHARACTER[Term::IMPLICIT_MENTION]) {
|
||||
$fields['type'] = Term::IMPLICIT_MENTION;
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
|
||||
DBA::insert('tag', $fields, true);
|
||||
Logger::info('Stored mention', ['uriid' => $uriid, 'match' => $match, 'fields' => $fields]);
|
||||
Tag::storeByHash($uriid, $match[1], $person['name'] ?: $person['nick'], $person['url']);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue