summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2013-07-01 07:48:18 -0700
committerBernhard Posselt <nukeawhale@gmail.com>2013-07-01 07:48:18 -0700
commitff7a20b74b47a2849afc640359473414925cd6ec (patch)
treee6bde3a58898efe648498e0af19b1b0a5f00f4eb
parent27c109e98ffa127f67e0dbe9ba641684f7dd339a (diff)
parent88de94d5109888ab453e85cf7b23b3941a94d2c9 (diff)
Merge pull request #266 from bluehaze/master
Pull request for issue #264
-rw-r--r--db/itemmapper.php6
-rw-r--r--tests/unit/db/ItemMapperTest.php6
2 files changed, 6 insertions, 6 deletions
diff --git a/db/itemmapper.php b/db/itemmapper.php
index 512de4c88..411396a65 100644
--- a/db/itemmapper.php
+++ b/db/itemmapper.php
@@ -124,7 +124,7 @@ class ItemMapper extends Mapper implements IMapper {
public function readAll($highestItemId, $time, $userId) {
$sql = 'UPDATE `*PREFIX*news_items` ' .
'SET `status` = `status` & ? ' .
- 'AND `last_modified` = ? ' .
+ ', `last_modified` = ? ' .
'WHERE `feed_id` IN (' .
'SELECT `id` FROM `*PREFIX*news_feeds` ' .
'WHERE `user_id` = ? ' .
@@ -138,7 +138,7 @@ class ItemMapper extends Mapper implements IMapper {
public function readFolder($folderId, $highestItemId, $time, $userId) {
$sql = 'UPDATE `*PREFIX*news_items` ' .
'SET `status` = `status` & ? ' .
- 'AND `last_modified` = ? ' .
+ ', `last_modified` = ? ' .
'WHERE `feed_id` IN (' .
'SELECT `id` FROM `*PREFIX*news_feeds` ' .
'WHERE `folder_id` = ? ' .
@@ -154,7 +154,7 @@ class ItemMapper extends Mapper implements IMapper {
public function readFeed($feedId, $highestItemId, $time, $userId){
$sql = 'UPDATE `*PREFIX*news_items` ' .
'SET `status` = `status` & ? ' .
- 'AND `last_modified` = ? ' .
+ ', `last_modified` = ? ' .
'WHERE `feed_id` = ? ' .
'AND `id` <= ? ' .
'AND EXISTS (' .
diff --git a/tests/unit/db/ItemMapperTest.php b/tests/unit/db/ItemMapperTest.php
index c88f27403..bf4d1fa60 100644
--- a/tests/unit/db/ItemMapperTest.php
+++ b/tests/unit/db/ItemMapperTest.php
@@ -135,7 +135,7 @@ class ItemMapperTest extends \OCA\AppFramework\Utility\MapperTestUtility {
public function testReadAll(){
$sql = 'UPDATE `*PREFIX*news_items` ' .
'SET `status` = `status` & ? ' .
- 'AND `last_modified` = ? ' .
+ ', `last_modified` = ? ' .
'WHERE `feed_id` IN (' .
'SELECT `id` FROM `*PREFIX*news_feeds` ' .
'WHERE `user_id` = ? ' .
@@ -150,7 +150,7 @@ class ItemMapperTest extends \OCA\AppFramework\Utility\MapperTestUtility {
public function testReadFolder(){
$sql = 'UPDATE `*PREFIX*news_items` ' .
'SET `status` = `status` & ? ' .
- 'AND `last_modified` = ? ' .
+ ', `last_modified` = ? ' .
'WHERE `feed_id` IN (' .
'SELECT `id` FROM `*PREFIX*news_feeds` ' .
'WHERE `folder_id` = ? ' .
@@ -166,7 +166,7 @@ class ItemMapperTest extends \OCA\AppFramework\Utility\MapperTestUtility {
public function testReadFeed(){
$sql = 'UPDATE `*PREFIX*news_items` ' .
'SET `status` = `status` & ? ' .
- 'AND `last_modified` = ? ' .
+ ', `last_modified` = ? ' .
'WHERE `feed_id` = ? ' .
'AND `id` <= ? ' .
'AND EXISTS (' .