diff --git a/web/includes/Server.php b/web/includes/Server.php index c0fd27a38..d49a4e914 100644 --- a/web/includes/Server.php +++ b/web/includes/Server.php @@ -100,10 +100,14 @@ class Server extends ZM_Object { $url = $this->Protocol().'://'; $url .= $this->Hostname(); - if ( $port ) { - $url .= ':'.$port; + if ( !$port ) { + $port = $this->Port(); + } + if ( $this->Protocol() == 'https' and $port == 443 ) { + } else if ( $this->Protocol() == 'http' and $port == 80 ) { } else { - $url .= ':'.$this->Port(); + Logger::Debug("Adding port $port for " . $this->Protocol()); + $url .= ':'.$port; } return $url; }