diff --git a/settings/ajax/setbackgroundjobsmode.php b/settings/ajax/setbackgroundjobsmode.php index 905b90e645..b0292f3b10 100644 --- a/settings/ajax/setbackgroundjobsmode.php +++ b/settings/ajax/setbackgroundjobsmode.php @@ -26,6 +26,9 @@ require_once('../../lib/base.php'); OC_Util::checkAdminUser(); OCP\JSON::callCheck(); -OC_Appconfig::setValue( 'core', 'backgroundjobs_mode', $_POST['mode'] ); +$mode = isset( $_POST['mode'] ) ? $_POST['mode'] : ''; +if( $mode == "none" || $mode == "ajax" || $mode == "webcron" || $mode == "cron" ){ + OC_Appconfig::setValue( 'core', 'backgroundjobs_mode', $_POST['mode'] ); +} echo 'true'; diff --git a/settings/templates/admin.php b/settings/templates/admin.php index 9370739427..8a573a556e 100755 --- a/settings/templates/admin.php +++ b/settings/templates/admin.php @@ -27,14 +27,12 @@ if(!$_['htaccessworking']) {
t('Cron');?> - > -
> -
+
> -
+
> -
+