diff options
author | Loui Chang <louipc.ist@gmail.com> | 2009-02-13 14:33:14 -0500 |
---|---|---|
committer | Loui Chang <louipc.ist@gmail.com> | 2009-02-13 14:33:14 -0500 |
commit | fec2720a774e7246847585ff7238c02b9b8c042c (patch) | |
tree | b8dc5651e060e7302eada44f5458e701b4d8512a /web/template | |
parent | 31ce2fc27705e32984354610a726e31653e04444 (diff) | |
download | aurweb-fec2720a774e7246847585ff7238c02b9b8c042c.tar.xz |
Fix Sources listing in package details.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
Diffstat (limited to 'web/template')
-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 77be067..f60fe35 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"; } } } |