Skip to content
Snippets Groups Projects
Commit bf7afa28 authored by Jakob Sack's avatar Jakob Sack
Browse files

Backgroundjobs: cron.php now checks for mode=="none"

parent 0d8df3f5
No related branches found
No related tags found
No related merge requests found
......@@ -47,7 +47,19 @@ if( !OC_Config::getValue( 'installed', false )){
// Handle unexpected errors
register_shutdown_function('handleUnexpectedShutdown');
// Exit if background jobs are disabled!
$appmode = OC_Appconfig::getValue( 'core', 'backgroundjobs_mode', 'ajax' );
if( $appmode == 'none' ){
my_temporary_cron_class::$sent = true;
if( OC::$CLI ){
echo 'Background Jobs are disabled!'.PHP_EOL;
}
else{
OC_JSON::error( array( 'data' => array( 'message' => 'Background jobs disabled!')));
}
exit( 1 );
}
if( OC::$CLI ){
if( $appmode != 'cron' ){
OC_Appconfig::setValue( 'core', 'backgroundjobs_mode', 'cron' );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment