97b536e3df
Adds a little button to the trusted domain warning, if an admin clicks on the warning he will be redirected to ownCloud and asked whether he want to trust this domain. By far not the cleanest code, or clean at all, but does the job and I don't see a reason to make a lot of changes for this little improvement.
21 lines
597 B
PHP
21 lines
597 B
PHP
<?php
|
|
/**
|
|
* Copyright (c) 2013-2014, Lukas Reschke <lukas@owncloud.com>
|
|
* This file is licensed under the Affero General Public License version 3 or later.
|
|
* See the COPYING-README file.
|
|
*/
|
|
|
|
OC_Util::checkAdminUser();
|
|
OCP\JSON::callCheck();
|
|
|
|
if(isset($_POST['enforceHTTPS'])) {
|
|
OC_Config::setValue( 'forcessl', filter_var($_POST['enforceHTTPS'], FILTER_VALIDATE_BOOLEAN));
|
|
}
|
|
|
|
if(isset($_POST['trustedDomain'])) {
|
|
$trustedDomains = OC_Config::getValue('trusted_domains');
|
|
$trustedDomains[] = $_POST['trustedDomain'];
|
|
OC_Config::setValue('trusted_domains', $trustedDomains);
|
|
}
|
|
|
|
echo 'true';
|