Revert change breaking multiport when servers not defined.

This commit is contained in:
Isaac Connor 2019-09-23 12:03:19 -04:00
parent c7d7d45380
commit a05c513643
1 changed files with 1 additions and 6 deletions

View File

@ -39,7 +39,7 @@ class Server extends ZM_Object {
} else if ( $this->Id() ) { } else if ( $this->Id() ) {
return $this->{'Name'}; return $this->{'Name'};
} }
$result = explode(':',$_SERVER['HTTP_HOST']); $result = explode(':', $_SERVER['HTTP_HOST']);
return $result[0]; return $result[0];
} }
@ -88,11 +88,6 @@ class Server extends ZM_Object {
} }
public function Url( $port = null ) { public function Url( $port = null ) {
if ( !$this->Id() ) {
# Trying to guess and make up values tends to break proxies. So just return nothing
# so that the resulting url will be something like "?view="
return '';
}
$url = $this->Protocol().'://'; $url = $this->Protocol().'://';
$url .= $this->Hostname(); $url .= $this->Hostname();
if ( $port ) { if ( $port ) {