Be more precise regarding backgroundjobs mode

This commit is contained in:
Jakob Sack 2012-08-09 01:02:05 +02:00
parent 7fa896971f
commit 13a0818fec
2 changed files with 9 additions and 3 deletions

View File

@ -23,9 +23,9 @@
$RUNTIME_NOSETUPFS = true;
require_once('lib/base.php');
$appmode = OC_Appconfig::getValue( 'core', 'backgroundjob_mode', 'web' );
$appmode = OC_Appconfig::getValue( 'core', 'backgroundjob_mode', 'ajax' );
if( OC::$CLI ){
if( $appmode == 'web' ){
if( $appmode != 'cron' ){
OC_Appconfig::setValue( 'core', 'backgroundjob_mode', 'cron' );
}
@ -41,7 +41,7 @@ if( OC::$CLI ){
OC_BackgroundJob_Worker::doAllSteps();
}
else{
if( $appmode == 'web' ){
if( $appmode == 'cron' ){
OC_JSON::error( array( 'data' => array( 'message' => 'Backgroundjobs are using system cron!')));
exit();
}

View File

@ -227,11 +227,17 @@ class OC{
OC_Util::addScript( "jquery.infieldlabel.min" );
OC_Util::addScript( "jquery-tipsy" );
OC_Util::addScript( "oc-dialogs" );
OC_Util::addScript( "backgroundjobs" );
OC_Util::addScript( "js" );
OC_Util::addScript( "eventsource" );
OC_Util::addScript( "config" );
//OC_Util::addScript( "multiselect" );
OC_Util::addScript('search','result');
if( OC_Appconfig::getValue( 'core', 'backgroundjob_mode', 'ajax' ) == 'ajax' ){
OC_Util::addScript( 'backgroundjobs' );
}
OC_Util::addStyle( "styles" );
OC_Util::addStyle( "multiselect" );
OC_Util::addStyle( "jquery-ui-1.8.16.custom" );