code style

This commit is contained in:
Robin Appelman 2013-04-20 21:26:47 +02:00
parent 03c7a52bc5
commit d0a5fe1f4a
1 changed files with 47 additions and 51 deletions

View File

@ -38,8 +38,7 @@ function handleUnexpectedShutdown() {
if (!TemporaryCronClass::$sent) {
if (OC::$CLI) {
echo 'Unexpected error!' . PHP_EOL;
}
else{
} else {
OC_JSON::error(array('data' => array('message' => 'Unexpected error!')));
}
}
@ -67,8 +66,7 @@ if( $appmode == 'none' ) {
TemporaryCronClass::$sent = true;
if (OC::$CLI) {
echo 'Background Jobs are disabled!' . PHP_EOL;
}
else{
} else {
OC_JSON::error(array('data' => array('message' => 'Background jobs disabled!')));
}
exit(1);
@ -97,14 +95,12 @@ if( OC::$CLI ) {
// Work
OC_BackgroundJob_Worker::doAllSteps();
}
else{
} else {
// We call cron.php from some website
if ($appmode == 'cron') {
// Cron is cron :-P
OC_JSON::error(array('data' => array('message' => 'Backgroundjobs are using system cron!')));
}
else{
} else {
// Work and success :-)
OC_BackgroundJob_Worker::doNextStep();
OC_JSON::success();