diff options
Diffstat (limited to 'db/mysql')
-rw-r--r-- | db/mysql/itemmapper.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/db/mysql/itemmapper.php b/db/mysql/itemmapper.php index 720f03744..fa08f933f 100644 --- a/db/mysql/itemmapper.php +++ b/db/mysql/itemmapper.php @@ -64,6 +64,8 @@ class ItemMapper extends \OCA\News\Db\ItemMapper { } public function readItem($itemId, $isRead, $lastModified, $userId) { + $item = $this->find($itemId, $userId); + if ($isRead) { $sql = 'UPDATE `*PREFIX*news_items` `items` JOIN `*PREFIX*news_feeds` `feeds` @@ -76,8 +78,9 @@ class ItemMapper extends \OCA\News\Db\ItemMapper { $item->getFingerprint(), $userId]; $this->execute($sql, $params); } else { - // no other behavior for mysql if should be marked unread - parent::readItem($itemId, $isRead, $lastModified, $userId); + $item->setLastModified($lastModified); + $item->setUnread(); + $this->update($item); } } |