portdb: fix links to github hosted repositories. Thanks nrxtx

This commit is contained in:
Thomas Penteker 2014-06-25 20:08:35 +02:00
parent ce69084728
commit d21d4c6747

View File

@ -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;
}