aboutsummaryrefslogtreecommitdiffstats
path: root/settings/ajax
diff options
context:
space:
mode:
Diffstat (limited to 'settings/ajax')
-rw-r--r--settings/ajax/setbackgroundjobsmode.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/settings/ajax/setbackgroundjobsmode.php b/settings/ajax/setbackgroundjobsmode.php
index 905b90e645c..b0292f3b106 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';