From: Roland Häder Date: Sun, 16 Jul 2017 17:25:33 +0000 (+0200) Subject: Let's name it better, more clear. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=b79a12c65fa8548095e367b48ec964e0a7a692a2;p=core.git Let's name it better, more clear. Signed-off-by: Roland Häder --- diff --git a/framework/config/class_FrameworkConfiguration.php b/framework/config/class_FrameworkConfiguration.php index 9736e395..16ebaf86 100644 --- a/framework/config/class_FrameworkConfiguration.php +++ b/framework/config/class_FrameworkConfiguration.php @@ -381,26 +381,27 @@ class FrameworkConfiguration implements Registerable { /** * Detects the HTTPS flag * - * @return $isSecured The detected HTTPS flag or null if failed + * @return $https The detected HTTPS flag or null if failed */ public function detectHttpSecured () { // Default is null - $isSecured = NULL; + $https = NULL; // Is HTTPS set? if ($this->isHttpSecured()) { // Then use it - $isSecured = $_SERVER['HTTPS']; + $https = $_SERVER['HTTPS']; } // END - if // Return it - return $isSecured; + return $https; } /** * Checks whether HTTPS is set in $_SERVER * - * @return $isset Whether HTTPS is set + * @return $isset Whether HTTPS is set + * @todo Test more fields */ public function isHttpSecured () { return (isset($_SERVER['HTTPS'])); @@ -413,16 +414,16 @@ class FrameworkConfiguration implements Registerable { */ public function detectBaseUrl () { // Initialize the URL - $baseUrl = 'http'; + $protocol = 'http'; // Do we have HTTPS? if ($this->isHttpSecured()) { // Add the >s< for HTTPS - $baseUrl .= 's'; + $protocol = 's'; } // END - if // Construct the full URL and secure it against CSRF attacks - $baseUrl = $baseUrl . '://' . $this->detectDomain() . $this->detectScriptPath(); + $baseUrl = $protocol . '://' . $this->detectDomain() . $this->detectScriptPath(); // Return the URL return $baseUrl;