[icinga-checkins] icinga.org: icingaweb2/master: Url: Add basePath to urlString if url is external or has a username

git at icinga.org git at icinga.org
Thu Oct 20 09:31:15 CEST 2016


Module: icingaweb2
Branch: master
Commit: 1ff3149636d1551bd8c4d351963d61cf58a52d75
URL:    https://git.icinga.org/?p=icingaweb2.git;a=commit;h=1ff3149636d1551bd8c4d351963d61cf58a52d75

Author: Noah Hilverling <noah.hilverling at netways.de>
Date:   Wed Oct 19 09:41:03 2016 +0200

Url: Add basePath to urlString if url is external or has a username

refs #12133

---

 library/Icinga/Web/Url.php |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/library/Icinga/Web/Url.php b/library/Icinga/Web/Url.php
index 3f70bd3..d2cbf1d 100644
--- a/library/Icinga/Web/Url.php
+++ b/library/Icinga/Web/Url.php
@@ -609,7 +609,7 @@ class Url
                 $urlString .= ':' . $this->getPort();
             }
 
-            return $urlString . '/' . $path;
+            return $urlString . $basePath . ($basePath !== '/' && $path ? '/' : '') . $path;
         } else {
             return $basePath . ($basePath !== '/' && $path ? '/' : '') . $path;
         }



More information about the icinga-checkins mailing list