diff options
-rwxr-xr-x | portdb/portdb/index.php | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/portdb/portdb/index.php b/portdb/portdb/index.php index 62a4cd3..9448e84 100755 --- a/portdb/portdb/index.php +++ b/portdb/portdb/index.php @@ -103,16 +103,17 @@ class Port function filesToXML() { $xml = ""; if ($this->repo->type == "httpup") { - $base_url = "{$this->repo->url}/"; + $base_url = "{$this->repo->url}"; } else { $base_url = localrepo($this->repo->name); } if ($base_url != "") { + $base_url = chop($base_url, "/"); $xml = "<files>"; - $xml .= "<pkgfile>{$base_url}{$this->name}/Pkgfile</pkgfile>"; - $xml .= "<footprint>{$base_url}{$this->name}/.footprint</footprint>"; - $xml .= "<md5sum>{$base_url}{$this->name}/.md5sum</md5sum>"; + $xml .= "<pkgfile>{$base_url}/{$this->name}/Pkgfile</pkgfile>"; + $xml .= "<footprint>{$base_url}/{$this->name}/.footprint</footprint>"; + $xml .= "<md5sum>{$base_url}/{$this->name}/.md5sum</md5sum>"; $xml .= "</files>"; } return $xml; @@ -121,15 +122,16 @@ class Port function filesToHTML() { $html = ""; if ($this->repo->type == "httpup") { - $base_url = "{$this->repo->url}/"; + $base_url = "{$this->repo->url}"; } else { $base_url = localrepo($this->repo->name); } if ($base_url != "") { - $html = "<a href=\"{$base_url}{$this->name}/Pkgfile\">P</a> "; - $html .= "<a href=\"{$base_url}{$this->name}/.footprint\">F</a> "; - $html .= "<a href=\"{$base_url}{$this->name}/.md5sum\">M</a>"; + $base_url = chop($base_url, "/"); + $html = "<a href=\"{$base_url}/{$this->name}/Pkgfile\">P</a> "; + $html .= "<a href=\"{$base_url}/{$this->name}/.footprint\">F</a> "; + $html .= "<a href=\"{$base_url}/{$this->name}/.md5sum\">M</a>"; } return $html; } |