summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Db/ItemMapper.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Db/ItemMapper.php b/lib/Db/ItemMapper.php
index bcf5aa1ec..7c3cb20b5 100644
--- a/lib/Db/ItemMapper.php
+++ b/lib/Db/ItemMapper.php
@@ -410,8 +410,10 @@ class ItemMapper extends NewsMapper
'FROM `*PREFIX*news_items` `items` ' .
'JOIN `*PREFIX*news_feeds` `feeds` ' .
'ON `feeds`.`id` = `items`.`feed_id` ' .
- 'AND `feeds`.`user_id` = ?';
- $params = [$userId];
+ 'AND ((`feeds`.`user_id` = ? ' .
+ 'AND `items`.`shared_by` = \'\') ' .
+ 'OR `items`.`shared_with` = ?)';
+ $params = [$userId, $userId];
$result = $this->findOneQuery($sql, $params);