summaryrefslogtreecommitdiffstats
path: root/db/itemmapper.php
diff options
context:
space:
mode:
Diffstat (limited to 'db/itemmapper.php')
-rw-r--r--db/itemmapper.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/db/itemmapper.php b/db/itemmapper.php
index 2704b775f..d54bbade1 100644
--- a/db/itemmapper.php
+++ b/db/itemmapper.php
@@ -169,9 +169,11 @@ class ItemMapper extends Mapper implements IMapper {
}
- public function findByGuidHash($guidHash, $userId){
- $sql = $this->makeSelectQuery('AND `*PREFIX*news_items`.`guid_hash` = ? ');
- $row = $this->findOneQuery($sql, array($userId, $guidHash));
+ public function findByGuidHash($guidHash, $feedId, $userId){
+ $sql = $this->makeSelectQuery(
+ 'AND `items`.`guid_hash` = ? ' .
+ 'AND `feed`.`id = ? ');
+ $row = $this->findOneQuery($sql, array($userId, $guidHash, $feedId));
$item = new Item();
$item->fromRow($row);