summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Penteker <tek@serverop.de>2014-06-25 20:08:35 +0200
committerThomas Penteker <tek@serverop.de>2014-06-25 20:08:35 +0200
commitd21d4c6747029e9eaba89d4d6411f502ceaf02ed (patch)
treee9fd0efa4436b7aeb489017b03663e530c294f88
parentce690847288aec23b738ff67382db77051ea46a1 (diff)
downloadwebtools-d21d4c6747029e9eaba89d4d6411f502ceaf02ed.tar.gz
webtools-d21d4c6747029e9eaba89d4d6411f502ceaf02ed.tar.xz
portdb: fix links to github hosted repositories. Thanks nrxtx
-rwxr-xr-xportdb/portdb/index.php18
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;
}

Generated by cgit