mirror of
https://github.com/friendica/friendica
synced 2024-12-23 04:00:15 +00:00
Issue 11440: Hashtags are now generated again
This commit is contained in:
parent
4729fca5d9
commit
67c3a20c4f
1 changed files with 8 additions and 5 deletions
|
@ -224,13 +224,16 @@ class Tag
|
||||||
{
|
{
|
||||||
$fields = ['name' => substr($name, 0, 96), 'url' => $url];
|
$fields = ['name' => substr($name, 0, 96), 'url' => $url];
|
||||||
|
|
||||||
if (!empty($type)) {
|
$tag = DBA::selectFirst('tag', ['id', 'type'], $fields);
|
||||||
$fields['type'] = $type;
|
if (DBA::isResult($tag)) {
|
||||||
|
if (empty($tag['type']) && !empty($type)) {
|
||||||
|
DBA::update('tag', ['type' => $type], $fields);
|
||||||
|
}
|
||||||
|
return $tag['id'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$tag = DBA::selectFirst('tag', ['id'], $fields);
|
if (!empty($type)) {
|
||||||
if (DBA::isResult($tag)) {
|
$fields['type'] = $type;
|
||||||
return $tag['id'];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DBA::insert('tag', $fields, Database::INSERT_IGNORE);
|
DBA::insert('tag', $fields, Database::INSERT_IGNORE);
|
||||||
|
|
Loading…
Reference in a new issue