summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
Diffstat (limited to 'web')
-rw-r--r--web/lib/pkgfuncs.inc12
1 files changed, 11 insertions, 1 deletions
diff --git a/web/lib/pkgfuncs.inc b/web/lib/pkgfuncs.inc
index 7a45bc29..2a6fda28 100644
--- a/web/lib/pkgfuncs.inc
+++ b/web/lib/pkgfuncs.inc
@@ -293,7 +293,17 @@ function package_details($id=0) {
print "<tr><td class='boxSoft'>";
$sources = package_sources($row["ID"]); # $sources[0] = 'src';
while (list($k, $src) = each($sources)) {
- print "<a href='".$src."'>".$src."</a><br />\n";
+ $parsed_url = parse_url($src);
+ if ($parsed_url['scheme'])
+ {
+ //It is an external source
+ print "<a href='".$src."'>".$src."</a><br />\n";
+ }
+ else
+ {
+ //It is presumably an internal source
+ print "<a href='".dirname($row['URLPath'])."/".$row['Name']."/".$src."'>".$src."</a><br />\n";
+ }
}
print "</td></tr>\n";
print "</table></td>";