summaryrefslogtreecommitdiffstats
path: root/lib/Db
diff options
context:
space:
mode:
authorMarco Nassabain <marco.nassabain@hotmail.com>2021-02-07 20:41:01 +0100
committerSean Molenaar <SMillerDev@users.noreply.github.com>2021-04-08 22:31:21 +0200
commit11bd056bdf1646fc670dba4b9611f8e0c3eaff97 (patch)
tree7bf256df934f7ffd5b5adac1c0f201774d796e4d /lib/Db
parentc6407404446532d2929864533a75bf08d844e9cc (diff)
🩹 Patch readAll: concerns items shared with user
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
Diffstat (limited to 'lib/Db')
-rw-r--r--lib/Db/ItemMapper.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Db/ItemMapper.php b/lib/Db/ItemMapper.php
index 0ff2ca036..bcf5aa1ec 100644
--- a/lib/Db/ItemMapper.php
+++ b/lib/Db/ItemMapper.php
@@ -147,13 +147,14 @@ class ItemMapper extends NewsMapper
$sql = 'UPDATE `*PREFIX*news_items` ' .
'SET unread = ? ' .
', `last_modified` = ? ' .
- 'WHERE `feed_id` IN (' .
+ 'WHERE ((`feed_id` IN (' .
'SELECT `id` FROM `*PREFIX*news_feeds` ' .
'WHERE `user_id` = ? ' .
') ' .
- 'AND `shared_by` = \'\' ' .
+ 'AND `shared_by` = \'\') ' .
+ 'OR `shared_with` = ?) ' .
'AND `id` <= ?';
- $params = [false, $time, $userId, $highestItemId];
+ $params = [false, $time, $userId, $userId, $highestItemId];
$this->execute($sql, $params);
}