diff options
Diffstat (limited to 'ajax/setallitemsread.php')
-rw-r--r-- | ajax/setallitemsread.php | 14 |
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--; } } |