From 1e37bc139bb28e6fe9b0dd0d477e2dbef5a2cab9 Mon Sep 17 00:00:00 2001 From: Bart Visscher Date: Sun, 14 Oct 2012 21:15:16 +0200 Subject: Whitespace cleanup --- lib/backgroundjob.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'lib/backgroundjob.php') diff --git a/lib/backgroundjob.php b/lib/backgroundjob.php index 896fd6f03..9495086f0 100644 --- a/lib/backgroundjob.php +++ b/lib/backgroundjob.php @@ -37,7 +37,7 @@ class Backgroundjob { return 1; } } - + static public function run() { if( \OC::$CLI ) { self::cliStep(); @@ -46,25 +46,25 @@ class Backgroundjob { self::webStep(); } } - + static private function cliStep() { $feedmapper = new FeedMapper(); - + // Iterate over all feeds $feeds = $feedmapper->findAll(); foreach( $feeds as $feed ) { self::updateFeed( $feedmapper, $feed ); } } - + static private function webStep() { // Iterate over all users $lastid = \OCP\Config::getAppValue('news', 'backgroundjob_lastid',0); - + $feedmapper = new FeedMapper(); $feeds = $feedmapper->findAll(); usort( $feeds, array( 'OCA\News\Backgroundjob', 'sortFeeds' )); - + $done = false; foreach( $feeds as $feed ) { if( $feed['id'] > $lastid ) { @@ -74,12 +74,12 @@ class Backgroundjob { self::updateFeed( $feedmapper, $feed ); } } - + if( !$done ) { \OCP\Config::setAppValue('news', 'backgroundjob_lastid',0); } } - + static private function updateFeed( $feedmapper, $feed ) { $newfeed = null; $newfeed = Utils::fetch( $feed['url'] ); -- cgit v1.2.3