summaryrefslogtreecommitdiffstats
path: root/ajax/setallitemsread.php
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2012-10-14 21:15:16 +0200
committerBart Visscher <bartv@thisnet.nl>2012-10-14 21:15:47 +0200
commit1e37bc139bb28e6fe9b0dd0d477e2dbef5a2cab9 (patch)
treefa56b07316b914f39e2dd02b70a61b05b016b967 /ajax/setallitemsread.php
parent365cecd2ec1bf2552ae0d8e064680ed36b0bf04e (diff)
Whitespace cleanup
Diffstat (limited to 'ajax/setallitemsread.php')
-rw-r--r--ajax/setallitemsread.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/ajax/setallitemsread.php b/ajax/setallitemsread.php
index f6d206e20..059c14749 100644
--- a/ajax/setallitemsread.php
+++ b/ajax/setallitemsread.php
@@ -4,10 +4,10 @@
*
* @author Bernhard Posselt
* Copyright (c) 2012 - Bernhard Posselt <nukeawhale@gmail.com>
-*
+*
* This file is licensed under the Affero General Public License version 3 or later.
* See the COPYING-README file
-*
+*
*/
// Check if we are a user
@@ -26,19 +26,19 @@ switch ($feedId) {
case -2:
$items = $itemMapper->findEveryItemByStatus(OCA\News\StatusFlag::UNREAD);
break;
-
+
case -1:
$items = $itemMapper->findEveryItemByStatus(OCA\News\StatusFlag::UNREAD | OCA\News\StatusFlag::IMPORTANT);
break;
default:
- $items = $itemMapper->findAllStatus($feedId, OCA\News\StatusFlag::UNREAD);
+ $items = $itemMapper->findAllStatus($feedId, OCA\News\StatusFlag::UNREAD);
break;
}
// FIXME: maybe there is a way to set all items read in the
-// FeedMapper instead of iterating through every item and updating as
+// FeedMapper instead of iterating through every item and updating as
// necessary
$success = false;
if($mostRecentItemId !== 0) {
@@ -50,8 +50,8 @@ foreach($items as $item) {
// FIXME: this should compare the modified date
if($mostRecentItemId === 0 || $item->getDate() <= $mostRecentItem->getDate()) {
$item->setRead();
- $success = $itemMapper->update($item);
- $unreadCount--;
+ $success = $itemMapper->update($item);
+ $unreadCount--;
}
}