mirror of
https://github.com/friendica/friendica
synced 2025-04-26 16:30:12 +00:00
Mode switch for insert
This commit is contained in:
parent
fa5acb3b21
commit
303aaa00ca
15 changed files with 56 additions and 31 deletions
|
@ -25,6 +25,7 @@ use Friendica\Content\Text\BBCode;
|
|||
use Friendica\Core\Cache\Duration;
|
||||
use Friendica\Core\Logger;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Database\Database;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\DI;
|
||||
use Friendica\Util\Strings;
|
||||
|
@ -151,7 +152,7 @@ class Tag
|
|||
}
|
||||
}
|
||||
|
||||
DBA::insert('post-tag', $fields, true);
|
||||
DBA::insert('post-tag', $fields, Database::INSERT_IGNORE);
|
||||
|
||||
Logger::info('Stored tag/mention', ['uri-id' => $uriid, 'tag-id' => $tagid, 'contact-id' => $cid, 'name' => $name, 'type' => $type, 'callstack' => System::callstack(8)]);
|
||||
}
|
||||
|
@ -172,7 +173,7 @@ class Tag
|
|||
return $tag['id'];
|
||||
}
|
||||
|
||||
DBA::insert('tag', $fields, true);
|
||||
DBA::insert('tag', $fields, Database::INSERT_IGNORE);
|
||||
$tid = DBA::lastInsertId();
|
||||
if (!empty($tid)) {
|
||||
return $tid;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue