From 3890dfee4a77805de586729a2721e8bfde479c17 Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 7 Feb 2018 20:09:37 +0000 Subject: [PATCH] Wrong function order in Item::update --- src/Model/Item.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/Model/Item.php b/src/Model/Item.php index cc42aafc61..410a45afe0 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -64,16 +64,14 @@ class Item extends BaseObject // The condition needn't to be a simple array but could be a complex condition. $items = dba::select('item', ['id', 'origin'], $condition); 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::insertFromFileFieldByItemId($item['id']); self::updateThread($item['id']); - Worker::add(PRIORITY_HIGH, "Notifier", 'edit_post', $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']); + } } return $rows; -- 2.39.5