diff options
author | Loui Chang <louipc.ist@gmail.com> | 2009-01-28 04:03:09 -0500 |
---|---|---|
committer | Loui Chang <louipc.ist@gmail.com> | 2009-01-28 04:03:09 -0500 |
commit | 8137572ad33f1ca9fde45774309caaa4c67fba12 (patch) | |
tree | dbf1d939b1e7b90908937c4f011203878dd292fd /web/template | |
parent | 17165b20e077c966f3e44fedda5cdbb1ff823257 (diff) | |
download | aurweb-8137572ad33f1ca9fde45774309caaa4c67fba12.tar.xz |
Add support for filename::url syntax for sources.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
Diffstat (limited to 'web/template')
-rw-r--r-- | web/template/pkg_details.php | 4 |
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 { |