distroquery.php: support for multiarch packages in repository packages list table
This commit is contained in:
parent
d625cb83c3
commit
f019f312cd
@ -64,7 +64,7 @@ $url_prefix = home_url() . "/rpms/";
|
|||||||
$j = json_decode($request["body"], true);
|
$j = json_decode($request["body"], true);
|
||||||
|
|
||||||
if ($j["error"] != "") {
|
if ($j["error"] != "") {
|
||||||
echo "<h3>ERROR: " . $j["error"] . "</h3>";
|
echo "<h5>ERROR: " . $j["error"] . "</h5>";
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
echo " > " . $repo;
|
echo " > " . $repo;
|
||||||
@ -114,11 +114,18 @@ $url_prefix = home_url() . "/rpms/";
|
|||||||
echo "0 " . _r("result(s) found");
|
echo "0 " . _r("result(s) found");
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "<table class=\"pkgpage\"><tr><th>" . _r("Name") . "</th><th>" . _r("Version") . "</th><th>" .
|
echo "<table class=\"pkgpage\"><tr><th>" .
|
||||||
_r("Summary") . "</th><th>" . _r("Last update") . "</th></tr>";
|
_r("Arch") . "</th><th>" .
|
||||||
|
_r("Name") . "</th><th>" .
|
||||||
|
_r("Version") . "</th><th>" .
|
||||||
|
_r("Summary") . "</th><th>" .
|
||||||
|
_r("Last update") . "</th></tr>";
|
||||||
foreach ($j["packages"] as $package) {
|
foreach ($j["packages"] as $package) {
|
||||||
$package_url = $url_prefix . $repo . "/" . $package["name"];
|
$package_url = $url_prefix . $repo . "/" . $package["name"];
|
||||||
echo "<tr><td><a href=\"" . $package_url . "\">". $package["name"] . "</a></td><td>" .
|
if ($package["arch"] != "src") $package_url .= "/" . $package["arch"];
|
||||||
|
echo "<tr><td>" .
|
||||||
|
$package["arch"] . "</td><td>" .
|
||||||
|
"<a href=\"" . $package_url . "\">". $package["name"] . "</a></td><td>" .
|
||||||
$package["version"] . "-" . $package["release"] . "</td><td>" .
|
$package["version"] . "-" . $package["release"] . "</td><td>" .
|
||||||
$package["summary"] . "</td><td style=\"white-space:no-wrap\">" . substr($package["buildtime"], 0, 10) . "</td></tr>";
|
$package["summary"] . "</td><td style=\"white-space:no-wrap\">" . substr($package["buildtime"], 0, 10) . "</td></tr>";
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user