Don't add 442 for https and 80 for http. Just cleaner

This commit is contained in:
Isaac Connor 2020-08-09 22:18:35 -04:00
parent 82357a0675
commit 25426d5fdd
1 changed files with 7 additions and 3 deletions

View File

@ -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;
}