Merge pull request #4415 from annando/item-update-fix
Wrong function order in Item::update
This commit is contained in:
commit
55851f03bb
1 changed files with 4 additions and 6 deletions
|
@ -64,17 +64,15 @@ class Item extends BaseObject
|
||||||
// The condition needn't to be a simple array but could be a complex condition.
|
// The condition needn't to be a simple array but could be a complex condition.
|
||||||
$items = dba::select('item', ['id', 'origin'], $condition);
|
$items = dba::select('item', ['id', 'origin'], $condition);
|
||||||
while ($item = dba::fetch($items)) {
|
while ($item = dba::fetch($items)) {
|
||||||
// We only need to notfiy others when it is an original entry from us
|
|
||||||
if (!$item['origin']) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
Term::insertFromTagFieldByItemId($item['id']);
|
Term::insertFromTagFieldByItemId($item['id']);
|
||||||
Term::insertFromFileFieldByItemId($item['id']);
|
Term::insertFromFileFieldByItemId($item['id']);
|
||||||
self::updateThread($item['id']);
|
self::updateThread($item['id']);
|
||||||
|
|
||||||
|
// We only need to notfiy others when it is an original entry from us
|
||||||
|
if ($item['origin']) {
|
||||||
Worker::add(PRIORITY_HIGH, "Notifier", 'edit_post', $item['id']);
|
Worker::add(PRIORITY_HIGH, "Notifier", 'edit_post', $item['id']);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return $rows;
|
return $rows;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue