From: Hypolite Petovan Date: Mon, 31 Oct 2016 18:27:19 +0000 (-0400) Subject: ping.php improvement: using baser cache key X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=db874f0fbe0429cd185c5420daf47db3cc96cc93;p=friendica.git ping.php improvement: using baser cache key --- diff --git a/boot.php b/boot.php index 5df6520dbd..8dd43101c0 100644 --- a/boot.php +++ b/boot.php @@ -800,7 +800,9 @@ class App { return self::$a->get_baseurl($ssl); } - if (!isset($this->baseurl[$ssl ? 'https' : 'http'])) { + $cache_index = $ssl ? 'https' : 'http'; + + if (!isset($this->baseurl[$cache_index])) { $scheme = $this->scheme; if ((x($this->config, 'system')) && (x($this->config['system'], 'ssl_policy'))) { @@ -824,9 +826,9 @@ class App { $this->hostname = get_config('config', 'hostname'); } - $this->baseurl[$ssl ? 'https' : 'http'] = $scheme . "://" . $this->hostname . ((isset($this->path) && strlen($this->path)) ? '/' . $this->path : '' ); + $this->baseurl[$cache_index] = $scheme . "://" . $this->hostname . ((isset($this->path) && strlen($this->path)) ? '/' . $this->path : '' ); } - return $this->baseurl[$ssl ? 'https' : 'http']; + return $this->baseurl[$cache_index]; } /**