mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-21 21:04:25 +02:00
parent
9fcc39e0ba
commit
a952a400ca
@ -410,11 +410,27 @@ class Url
|
||||
*/
|
||||
public function getBaseUrl()
|
||||
{
|
||||
if (!$this->isExternal()) {
|
||||
if (! $this->isExternal()) {
|
||||
return $this->getBasePath();
|
||||
}
|
||||
|
||||
return $this->getScheme() . '://' . $this->getHost() . ($this->getPort() ? (':' . $this->getPort()) : '');
|
||||
$urlString = '';
|
||||
if ($this->getScheme()) {
|
||||
$urlString .= $this->getScheme() . '://';
|
||||
}
|
||||
if ($this->getPassword()) {
|
||||
$urlString .= $this->getUsername() . ':' . $this->getPassword() . '@';
|
||||
} elseif ($this->getUsername()) {
|
||||
$urlString .= $this->getUsername() . '@';
|
||||
}
|
||||
if ($this->getHost()) {
|
||||
$urlString .= $this->getHost();
|
||||
}
|
||||
if ($this->getPort()) {
|
||||
$urlString .= ':' . $this->getPort();
|
||||
}
|
||||
|
||||
return $urlString;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user