summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLoui Chang <louipc.ist@gmail.com>2009-01-28 04:03:09 -0500
committerLoui Chang <louipc.ist@gmail.com>2009-01-28 04:03:09 -0500
commit8137572ad33f1ca9fde45774309caaa4c67fba12 (patch)
treedbf1d939b1e7b90908937c4f011203878dd292fd
parent17165b20e077c966f3e44fedda5cdbb1ff823257 (diff)
downloadaurweb-8137572ad33f1ca9fde45774309caaa4c67fba12.tar.xz
Add support for filename::url syntax for sources.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
-rw-r--r--web/template/pkg_details.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/web/template/pkg_details.php b/web/template/pkg_details.php
index ffe735c..77be067 100644
--- a/web/template/pkg_details.php
+++ b/web/template/pkg_details.php
@@ -146,10 +146,12 @@ $submitted_time = ($row["SubmittedTS"] == 0) ? "(unknown)" : gmdate("r", intval(
<?php
while (list($k, $src) = each($sources)) {
$parsed_url = parse_url($src);
+
if ($parsed_url['scheme'])
{
# It is an external source
- echo "<a href='".$src."'>".$src."</a><br />\n";
+ $src = explode('::', $src);
+ echo "<a href=\"" . (isset($src[1]) ? $src[1] : $src[0]) . "\">$src[0]</a><br />\n";
}
else
{