]> git.mxchange.org Git - friendica.git/blobdiff - boot.php
Merge pull request #3153 from tobiasd/20170208-quattroembedvideo
[friendica.git] / boot.php
index a9a062e62372f0820a414c645b76c39016e96cd1..56fb05435832cd62ef134c699631f96e80988043 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -40,7 +40,7 @@ define ( 'FRIENDICA_PLATFORM',     'Friendica');
 define ( 'FRIENDICA_CODENAME',     'Asparagus');
 define ( 'FRIENDICA_VERSION',      '3.5.1-dev' );
 define ( 'DFRN_PROTOCOL_VERSION',  '2.23'    );
-define ( 'DB_UPDATE_VERSION',      1213      );
+define ( 'DB_UPDATE_VERSION',      1214      );
 
 /**
  * @brief Constant with a HTML line break.
@@ -245,6 +245,7 @@ define ( 'NETWORK_STATUSNET',        'stac');    // Statusnet connector
 define ( 'NETWORK_APPNET',           'apdn');    // app.net
 define ( 'NETWORK_NEWS',             'nntp');    // Network News Transfer Protocol
 define ( 'NETWORK_ICALENDAR',        'ical');    // iCalendar
+define ( 'NETWORK_PNUT',             'pnut');    // pnut.io
 define ( 'NETWORK_PHANTOM',          'unkn');    // Place holder
 /** @}*/
 
@@ -274,6 +275,7 @@ $netgroup_ids = array(
        NETWORK_APPNET    => (-17),
        NETWORK_NEWS      => (-18),
        NETWORK_ICALENDAR => (-19),
+       NETWORK_PNUT      => (-20),
 
        NETWORK_PHANTOM  => (-127),
 );
@@ -572,7 +574,6 @@ class App {
 
        private $scheme;
        private $hostname;
-       private $baseurl;
        private $db;
 
        private $curl_code;
@@ -800,8 +801,6 @@ class App {
         * - Host name is determined either by system.hostname or inferred from request
         * - Path is inferred from SCRIPT_NAME
         *
-        * Caches the result (depending on $ssl value) for performance.
-        *
         * Note: $ssl parameter value doesn't directly correlate with the resulting protocol
         *
         * @param bool $ssl Whether to append http or https under SSL_POLICY_SELFSIGN
@@ -814,17 +813,9 @@ class App {
                        return self::$a->get_baseurl($ssl);
                }
 
-               // Arbitrary values, the resulting url protocol can be different
-               $cache_index = $ssl ? 'https' : 'http';
-
-               // Cached value found, nothing to process
-               if (isset($this->baseurl[$cache_index])) {
-                       return $this->baseurl[$cache_index];
-               }
-
                $scheme = $this->scheme;
 
-               if (Config::get('system', 'ssl_policy') === SSL_POLICY_FULL) {
+               if (Config::get('system', 'ssl_policy') == SSL_POLICY_FULL) {
                        $scheme = 'https';
                }
 
@@ -840,12 +831,10 @@ class App {
                }
 
                if (Config::get('config', 'hostname') != '') {
-                       $this->hostname = get_config('config', 'hostname');
+                       $this->hostname = Config::get('config', 'hostname');
                }
 
-               $this->baseurl[$cache_index] = $scheme . "://" . $this->hostname . ((isset($this->path) && strlen($this->path)) ? '/' . $this->path : '' );
-
-               return $this->baseurl[$cache_index];
+               return $scheme . "://" . $this->hostname . ((isset($this->path) && strlen($this->path)) ? '/' . $this->path : '' );
        }
 
        /**
@@ -858,8 +847,6 @@ class App {
        function set_baseurl($url) {
                $parsed = @parse_url($url);
 
-               $this->baseurl = [];
-
                if($parsed) {
                        $this->scheme = $parsed['scheme'];