From e931feddaf7834b226736215d34209c6847d05a1 Mon Sep 17 00:00:00 2001 From: donal72 Date: Mon, 15 Jan 2007 08:26:56 +0000 Subject: [PATCH] Mnet: Bugfix: Prevent a second record to be created for an existing host if the user entered http://example.com/ as the wwwroot --- mnet/peer.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mnet/peer.php b/mnet/peer.php index 028040e463..898c12c659 100644 --- a/mnet/peer.php +++ b/mnet/peer.php @@ -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; -- 2.39.5