Only perform Term::deleteAllTags when needed + not needed redirect
This commit is contained in:
@@ -896,14 +896,15 @@ class Item extends BaseObject
|
||||
}
|
||||
|
||||
if (!is_null($tags)) {
|
||||
Term::deleteAllTags($item['id']);
|
||||
|
||||
if ($tags) {
|
||||
Term::insertFromTagFieldByItemId($item['id'], $tags);
|
||||
if (!empty($item['tag'])) {
|
||||
DBA::update('item', ['tag' => ''], ['id' => $item['id']]);
|
||||
}
|
||||
}
|
||||
else {
|
||||
Term::deleteAllTags($item['id']);
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($files)) {
|
||||
|
||||
Reference in New Issue
Block a user