mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Fix Sources listing in package details.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
This commit is contained in:
parent
31ce2fc277
commit
fec2720a77
1 changed files with 8 additions and 9 deletions
|
@ -145,23 +145,22 @@ $submitted_time = ($row["SubmittedTS"] == 0) ? "(unknown)" : gmdate("r", intval(
|
||||||
<div>
|
<div>
|
||||||
<?php
|
<?php
|
||||||
while (list($k, $src) = each($sources)) {
|
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
|
# 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
|
# It is presumably an internal source
|
||||||
if ($row["LocationID"] == 2) {
|
if ($row["LocationID"] == 2) {
|
||||||
echo "<a href='".dirname($row['URLPath'])."/".$row['Name'];
|
echo "<a href='".dirname($row['URLPath'])."/".$row['Name'];
|
||||||
echo "/".$src."'>".$src."</a><br />\n";
|
echo "/$src'>$src</a><br />\n";
|
||||||
} elseif ($row["LocationID"] == 3) {
|
} elseif ($row["LocationID"] == 3) {
|
||||||
echo "<a href='http://repos.archlinux.org/viewvc.cgi/community/" . $row["Category"] . "/" . $row["Name"] . "/?root=community&pathrev=CURRENT'>";
|
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";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue