mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 08:44:07 -04:00
Redirect user after clicking on link
Use DI
This commit is contained in:
parent
88c3a4a31a
commit
dd871098c5
2 changed files with 6 additions and 4 deletions
|
|
@ -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';
|
||||
|
|
|
|||
|
|
@ -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'));
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue