]> git.mxchange.org Git - friendica.git/commitdiff
Some more config stuff
authorMichael <heluecht@pirati.ca>
Tue, 17 Jan 2017 19:33:06 +0000 (19:33 +0000)
committerMichael <heluecht@pirati.ca>
Tue, 17 Jan 2017 19:33:06 +0000 (19:33 +0000)
boot.php

index a9b4e4d2937513a68da03db09583f0b3a429bb3f..d598ef8666f624634d23e7e3c58c97b91c761d0e 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -825,24 +825,22 @@ class App {
 
                $scheme = $this->scheme;
 
-               if ((x($this->config, 'system')) && (x($this->config['system'], 'ssl_policy'))) {
-                       if (intval($this->config['system']['ssl_policy']) === SSL_POLICY_FULL) {
-                               $scheme = 'https';
-                       }
+               if (Config::get('system', 'ssl_policy') === SSL_POLICY_FULL) {
+                       $scheme = 'https';
+               }
 
-                       //      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.
+               //      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.
 
-                       if ($this->config['system']['ssl_policy'] == SSL_POLICY_SELFSIGN) {
-                               if ($ssl) {
-                                       $scheme = 'https';
-                               } else {
-                                       $scheme = 'http';
-                               }
+               if (Config::get('system', 'ssl_policy') == SSL_POLICY_SELFSIGN) {
+                       if ($ssl) {
+                               $scheme = 'https';
+                       } else {
+                               $scheme = 'http';
                        }
                }
 
-               if (get_config('config', 'hostname') != '') {
+               if (Config::get('config', 'hostname') != '') {
                        $this->hostname = get_config('config', 'hostname');
                }