Some more config stuff

This commit is contained in:
Michael 2017-01-17 19:33:06 +00:00
parent 53393233c3
commit 045e94ccf3
1 changed files with 12 additions and 14 deletions

View File

@ -825,24 +825,22 @@ class App {
$scheme = $this->scheme; $scheme = $this->scheme;
if ((x($this->config, 'system')) && (x($this->config['system'], 'ssl_policy'))) { if (Config::get('system', 'ssl_policy') === SSL_POLICY_FULL) {
if (intval($this->config['system']['ssl_policy']) === SSL_POLICY_FULL) {
$scheme = 'https'; $scheme = 'https';
} }
// Basically, we have $ssl = true on any links which can only be seen by a logged in user // Basically, we have $ssl = true on any links which can only be seen by a logged in user
// (and also the login link). Anything seen by an outsider will have it turned off. // (and also the login link). Anything seen by an outsider will have it turned off.
if ($this->config['system']['ssl_policy'] == SSL_POLICY_SELFSIGN) { if (Config::get('system', 'ssl_policy') == SSL_POLICY_SELFSIGN) {
if ($ssl) { if ($ssl) {
$scheme = 'https'; $scheme = 'https';
} else { } else {
$scheme = 'http'; $scheme = 'http';
} }
} }
}
if (get_config('config', 'hostname') != '') { if (Config::get('config', 'hostname') != '') {
$this->hostname = get_config('config', 'hostname'); $this->hostname = get_config('config', 'hostname');
} }