diff options
author | Lukas Reschke <lukas@owncloud.com> | 2014-08-22 16:01:03 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2014-08-25 22:15:54 +0200 |
commit | dac8dead074fa58739d7c0b3b0a800f9ae32367a (patch) | |
tree | c5fabdbd09345e18c0944bfd6adda1b5d5d3a455 /settings | |
parent | 09ab1f16c08838ab0583e88c789c987f8eeb4a46 (diff) | |
download | nextcloud-server-dac8dead074fa58739d7c0b3b0a800f9ae32367a.tar.gz nextcloud-server-dac8dead074fa58739d7c0b3b0a800f9ae32367a.zip |
Redirect user after clicking on link
Use DI
Diffstat (limited to 'settings')
-rw-r--r-- | settings/ajax/setsecurity.php | 6 | ||||
-rw-r--r-- | settings/js/admin.js | 4 |
2 files changed, 6 insertions, 4 deletions
diff --git a/settings/ajax/setsecurity.php b/settings/ajax/setsecurity.php index 3cb1d05ee63..f1f737a4943 100644 --- a/settings/ajax/setsecurity.php +++ b/settings/ajax/setsecurity.php @@ -9,13 +9,13 @@ OC_Util::checkAdminUser(); OCP\JSON::callCheck(); if(isset($_POST['enforceHTTPS'])) { - OC_Config::setValue( 'forcessl', filter_var($_POST['enforceHTTPS'], FILTER_VALIDATE_BOOLEAN)); + \OC::$server->getConfig()->setSystemValue('forcessl', filter_var($_POST['enforceHTTPS'], FILTER_VALIDATE_BOOLEAN)); } if(isset($_POST['trustedDomain'])) { - $trustedDomains = OC_Config::getValue('trusted_domains'); + $trustedDomains = \OC::$server->getConfig()->getSystemValue('trusted_domains'); $trustedDomains[] = $_POST['trustedDomain']; - OC_Config::setValue('trusted_domains', $trustedDomains); + \OC::$server->getConfig()->setSystemValue('trusted_domains', $trustedDomains); } echo 'true'; diff --git a/settings/js/admin.js b/settings/js/admin.js index b09704f87b7..56dc1b98716 100644 --- a/settings/js/admin.js +++ b/settings/js/admin.js @@ -48,7 +48,9 @@ $(document).ready(function(){ $.ajax({ type: 'POST', url: OC.generateUrl('settings/ajax/setsecurity.php'), - data: { trustedDomain: params.trustDomain} + data: { trustedDomain: params.trustDomain } + }).done(function() { + window.location.replace(OC.generateUrl('settings/admin')); }); } }); |