diff options
author | Lukas Reschke <lukas@owncloud.com> | 2014-08-21 22:22:35 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2014-08-25 22:15:54 +0200 |
commit | 0a2e4711631c404f55a8c41f8609e6b403c7e408 (patch) | |
tree | 8fa324537d8311dab2339a31bb390e859ed33ee4 /lib | |
parent | a70fe184e7cf13d7da33fdaf2b606abbaa8a2d33 (diff) | |
download | nextcloud-server-0a2e4711631c404f55a8c41f8609e6b403c7e408.tar.gz nextcloud-server-0a2e4711631c404f55a8c41f8609e6b403c7e408.zip |
Add a trusted domain wizard
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.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/base.php | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/base.php b/lib/base.php index ed0830c1f72..ab3e34a73b4 100644 --- a/lib/base.php +++ b/lib/base.php @@ -670,10 +670,9 @@ class OC { header('HTTP/1.1 400 Bad Request'); header('Status: 400 Bad Request'); - OC_Template::printErrorPage( - $l->t('You are accessing the server from an untrusted domain.'), - $l->t('Please contact your administrator. If you are an administrator of this instance, configure the "trusted_domain" setting in config/config.php. An example configuration is provided in config/config.sample.php.') - ); + $tmpl = new OCP\Template('core', 'untrustedDomain', 'guest'); + $tmpl->assign('domain', $_SERVER['SERVER_NAME']); + $tmpl->printPage(); return; } |