Mnet: Bugfix: Prevent a second record to be created for an existing host if the user entered http://example.com/ as the wwwroot

This commit is contained in:
donal72 2007-01-15 08:26:56 +00:00
parent ca1131e2ea
commit e931feddaf

View File

@ -27,6 +27,10 @@ class mnet_peer {
function bootstrap($wwwroot) {
if (substr($wwwroot, 0, -1) == '/') {
$wwwroot = substr($wwwroot, 0, -1);
}
if ( ! $this->set_wwwroot($wwwroot) ) {
$hostname = mnet_get_hostname_from_uri($wwwroot);
@ -52,10 +56,6 @@ class mnet_peer {
}
}
if (substr($wwwroot, 0, -1) == '/') {
$wwwroot = substr($wwwroot, 0, -1);
}
$this->wwwroot = $wwwroot;
$this->ip_address = $ip_address;
$this->deleted = 0;