[icinga-checkins] icinga.org: icingaweb2/bugfix/ username-and-password-not-being-passed-in-navigation-item-urls-12133: Url: Add use of method setBasePath in method setBaseUrl

git at icinga.org git at icinga.org
Tue Oct 18 16:19:43 CEST 2016


Module: icingaweb2
Branch: bugfix/username-and-password-not-being-passed-in-navigation-item-urls-12133
Commit: 9fcc39e0bad22cde23019bb7652f83843cdbb3dc
URL:    https://git.icinga.org/?p=icingaweb2.git;a=commit;h=9fcc39e0bad22cde23019bb7652f83843cdbb3dc

Author: Noah Hilverling <noah.hilverling at netways.de>
Date:   Tue Oct 18 16:15:14 2016 +0200

Url: Add use of method setBasePath in method setBaseUrl

refs #12133

---

 library/Icinga/Web/Url.php |   15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/library/Icinga/Web/Url.php b/library/Icinga/Web/Url.php
index 19310e6..4128a23 100644
--- a/library/Icinga/Web/Url.php
+++ b/library/Icinga/Web/Url.php
@@ -385,14 +385,17 @@ class Url
         if (isset($urlParts["port"])) {
             $this->setPort($urlParts["port"]);
         }
-        if (isset($urlParts["scheme"])) {
-            $this->setScheme($urlParts["scheme"]);
+        if (isset($urlParts['scheme'])) {
+            $this->setScheme($urlParts['scheme']);
         }
-        if (isset($urlParts["user"])) {
-            $this->setUsername($urlParts["user"]);
+        if (isset($urlParts['user'])) {
+            $this->setUsername($urlParts['user']);
         }
-        if (isset($urlParts["pass"])) {
-            $this->setPassword($urlParts["pass"]);
+        if (isset($urlParts['pass'])) {
+            $this->setPassword($urlParts['pass']);
+        }
+        if (isset($urlParts['path'])) {
+            $this->setBasePath($urlParts['path']);
         }
 
         return $this;



More information about the icinga-checkins mailing list