$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' );
}
OC_BackgroundJob_Worker::doAllSteps();
}
else{
- if( $appmode == 'web' ){
+ if( $appmode == 'cron' ){
OC_JSON::error( array( 'data' => array( 'message' => 'Backgroundjobs are using system cron!')));
exit();
}
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" );