diff options
author | Bart Visscher <bartv@thisnet.nl> | 2012-10-14 21:15:16 +0200 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2012-10-14 21:15:47 +0200 |
commit | 1e37bc139bb28e6fe9b0dd0d477e2dbef5a2cab9 (patch) | |
tree | fa56b07316b914f39e2dd02b70a61b05b016b967 /ajax | |
parent | 365cecd2ec1bf2552ae0d8e064680ed36b0bf04e (diff) |
Whitespace cleanup
Diffstat (limited to 'ajax')
-rw-r--r-- | ajax/changefoldername.php | 4 | ||||
-rw-r--r-- | ajax/collapsefolder.php | 4 | ||||
-rw-r--r-- | ajax/importopml.php | 14 | ||||
-rw-r--r-- | ajax/loadfeed.php | 4 | ||||
-rw-r--r-- | ajax/movefeedtofolder.php | 4 | ||||
-rw-r--r-- | ajax/setallitemsread.php | 14 | ||||
-rw-r--r-- | ajax/setitemstatus.php | 4 | ||||
-rw-r--r-- | ajax/updatefeed.php | 2 | ||||
-rw-r--r-- | ajax/usersettings.php | 8 |
9 files changed, 29 insertions, 29 deletions
diff --git a/ajax/changefoldername.php b/ajax/changefoldername.php index e7a7b6f1b..9c829bccb 100644 --- a/ajax/changefoldername.php +++ b/ajax/changefoldername.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 diff --git a/ajax/collapsefolder.php b/ajax/collapsefolder.php index 66d879d2c..5c170a8e6 100644 --- a/ajax/collapsefolder.php +++ b/ajax/collapsefolder.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 diff --git a/ajax/importopml.php b/ajax/importopml.php index f826fd81b..adf14e86e 100644 --- a/ajax/importopml.php +++ b/ajax/importopml.php @@ -26,7 +26,7 @@ function bailOut($msg) { if(!isset($_POST['path'])) { bailOut($l->t('No file path was submitted.')); -} +} require_once 'news/opmlparser.php'; @@ -39,7 +39,7 @@ try { } if ($parsed == null) { - bailOut($l->t('An error occurred while parsing the file.')); + bailOut($l->t('An error occurred while parsing the file.')); } $data = $parsed->getData(); @@ -65,7 +65,7 @@ function importFeed($feedurl, $folderid) { OCP\Util::writeLog('news','ajax/importopml.php: Error adding feed: '. $feedurl, OCP\Util::ERROR); return false; } - + return true; } @@ -86,7 +86,7 @@ function importFolder($name, $parentid) { OCP\Util::writeLog('news','ajax/importopml.php: Error adding folder' . $name, OCP\Util::ERROR); return null; } - + return $folderid; } @@ -94,11 +94,11 @@ function importList($data, $parentid) { $countsuccess = 0; foreach($data as $collection) { if ($collection instanceOf OCA\News\Feed) { - $feedurl = $collection->getUrl(); + $feedurl = $collection->getUrl(); if (importFeed($feedurl, $parentid)) { $countsuccess++; } - } + } else if ($collection instanceOf OCA\News\Folder) { $folderid = importFolder($collection->getName(), $parentid); if ($folderid) { @@ -115,5 +115,5 @@ function importList($data, $parentid) { $countsuccess = importList($data, 0); -OCP\JSON::success(array('data' => array('title'=>$parsed->getTitle(), 'count'=>$parsed->getCount(), +OCP\JSON::success(array('data' => array('title'=>$parsed->getTitle(), 'count'=>$parsed->getCount(), 'countsuccess'=>$countsuccess))); diff --git a/ajax/loadfeed.php b/ajax/loadfeed.php index 45d6071e5..1880f2986 100644 --- a/ajax/loadfeed.php +++ b/ajax/loadfeed.php @@ -26,8 +26,8 @@ $feedId = (int)$_POST['id']; $feedType = (int)$_POST['type']; -OCP\Config::setUserValue(OCP\USER::getUser(), 'news', 'lastViewedFeed', $feedId); -OCP\Config::setUserValue(OCP\USER::getUser(), 'news', 'lastViewedFeedType', $feedType); +OCP\Config::setUserValue(OCP\USER::getUser(), 'news', 'lastViewedFeed', $feedId); +OCP\Config::setUserValue(OCP\USER::getUser(), 'news', 'lastViewedFeedType', $feedType); $showAll = OCP\Config::getUserValue(OCP\USER::getUser(), 'news', 'showAll'); diff --git a/ajax/movefeedtofolder.php b/ajax/movefeedtofolder.php index 4a3747bb6..92d618c67 100644 --- a/ajax/movefeedtofolder.php +++ b/ajax/movefeedtofolder.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 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--; } } diff --git a/ajax/setitemstatus.php b/ajax/setitemstatus.php index 9586940b3..1886de738 100644 --- a/ajax/setitemstatus.php +++ b/ajax/setitemstatus.php @@ -4,10 +4,10 @@ * * @author Alessandro Cosentino * Copyright (c) 2012 - Alessandro Cosentino <cosenal@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 diff --git a/ajax/updatefeed.php b/ajax/updatefeed.php index 5c981f38d..19542fa6d 100644 --- a/ajax/updatefeed.php +++ b/ajax/updatefeed.php @@ -41,7 +41,7 @@ if(!$newfeedid) { else { $itemmapper = new OCA\News\ItemMapper($userid); $unreadcounter = $itemmapper->countAllStatus($newfeedid, OCA\News\StatusFlag::UNREAD); - + OCP\JSON::success(array('data' => array('message' => $l->t('Feed updated!'), 'unreadcount' => $unreadcounter))); exit(); } diff --git a/ajax/usersettings.php b/ajax/usersettings.php index f027ee91b..2602230dd 100644 --- a/ajax/usersettings.php +++ b/ajax/usersettings.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 @@ -22,7 +22,7 @@ if(isset($_POST['showAll'])) { } else { $showAll = true; } - OCP\Config::setUserValue(OCP\USER::getUser(), 'news', 'showAll', $showAll); + OCP\Config::setUserValue(OCP\USER::getUser(), 'news', 'showAll', $showAll); } -OCP\JSON::success(); +OCP\JSON::success(); |