diff options
author | Bernhard Posselt <nukeawhale@gmail.com> | 2013-03-26 11:08:14 +0100 |
---|---|---|
committer | Bernhard Posselt <nukeawhale@gmail.com> | 2013-03-26 11:08:14 +0100 |
commit | d0fde9dbce129b0dbb94d577d9685764c7d5ea4b (patch) | |
tree | ef7724db5fa4cf373a4c2393972ec4e65953593a /db | |
parent | 3560ac0555ef2fbb7320e946c36d46aeef71b0b5 (diff) |
also use feedid because feed + guid hash are unique together
Diffstat (limited to 'db')
-rw-r--r-- | db/itemmapper.php | 8 |
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); |