diff options
author | Loui Chang <louipc.ist@gmail.com> | 2009-02-13 20:33:14 +0100 |
---|---|---|
committer | Loui Chang <louipc.ist@gmail.com> | 2009-02-13 20:33:14 +0100 |
commit | fec2720a774e7246847585ff7238c02b9b8c042c (patch) | |
tree | b8dc5651e060e7302eada44f5458e701b4d8512a /web | |
parent | 31ce2fc27705e32984354610a726e31653e04444 (diff) | |
download | aur-fec2720a774e7246847585ff7238c02b9b8c042c.tar.gz aur-fec2720a774e7246847585ff7238c02b9b8c042c.tar.xz |
Fix Sources listing in package details.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
Diffstat (limited to 'web')
-rw-r--r-- | web/template/pkg_details.php | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/web/template/pkg_details.php b/web/template/pkg_details.php index 77be0670..f60fe353 100644 --- a/web/template/pkg_details.php +++ b/web/template/pkg_details.php @@ -145,23 +145,22 @@ $submitted_time = ($row["SubmittedTS"] == 0) ? "(unknown)" : gmdate("r", intval( <div> <?php while (list($k, $src) = each($sources)) { - $parsed_url = parse_url($src); + $src = explode('::', $src); + $parsed_url = parse_url($src[0]); - if ($parsed_url['scheme']) - { + if (isset($parsed_url['scheme']) || isset($src[1])) { # It is an external source - $src = explode('::', $src); - echo "<a href=\"" . (isset($src[1]) ? $src[1] : $src[0]) . "\">$src[0]</a><br />\n"; + echo "<a href=\"" . (isset($src[1]) ? $src[1] : $src[0]) . "\">{$src[0]}</a><br />\n"; } - else - { + else { + $src = $src[0]; # It is presumably an internal source if ($row["LocationID"] == 2) { echo "<a href='".dirname($row['URLPath'])."/".$row['Name']; - echo "/".$src."'>".$src."</a><br />\n"; + echo "/$src'>$src</a><br />\n"; } elseif ($row["LocationID"] == 3) { echo "<a href='http://repos.archlinux.org/viewvc.cgi/community/" . $row["Category"] . "/" . $row["Name"] . "/?root=community&pathrev=CURRENT'>"; - echo $src."</a><br />\n"; + echo "$src</a><br />\n"; } } } |