Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-02-18 20:47:42 +0100
committerErich Eckner <git@eckner.net>2019-02-18 20:47:42 +0100
commitad8b318c1eaddbc2043b9a7cbaa6332177db491c (patch)
tree818610f636b74df5b72414677569073601b66ad4 /packages
parent83be298ae3123e724a64da98a5ee2a7d3f52fcec (diff)
move array of columns from packages/index.php to lib/style.php
Diffstat (limited to 'packages')
-rw-r--r--packages/index.php55
1 files changed, 6 insertions, 49 deletions
diff --git a/packages/index.php b/packages/index.php
index 211bc3c..4d854a9 100644
--- a/packages/index.php
+++ b/packages/index.php
@@ -129,56 +129,13 @@ require_once BASE . "/lib/format.php";
false
);
- $sorts = array(
- "arch" => array(
- "title" => "architecture",
- "label" => "Arch",
- "mysql" => "`architectures`.`name`"
- ),
- "repo" => array(
- "title" => "repository",
- "label" => "Repo",
- "mysql" => "CONCAT(`r_a`.`name`,\"/\",`repositories`.`name`)"
- ),
- "pkgname" => array(
- "title" => "package name",
- "label" => "Name",
- "mysql" => "`binary_packages`.`pkgname`"
- ),
- "pkgver" => array(
- "title" => "package version",
- "label" => "Version",
- "mysql" => mysql_query_package_version("binary_packages")
- ),
- "bugs" => array(
- "title" => "bug status",
- "label" => "Bugs",
- "mysql" => "NOT `binary_packages`.`has_issues`"
- ),
- "build_date" => array(
- "title" => "build date",
- "label" => "Build Date",
- "mysql" => "IFNULL(`build_assignments`.`return_date`,\"00-00-0000 00:00:00\")"
- ),
- "move_date" => array(
- "title" => "last update",
- "label" => "Last Updated",
- "mysql" => "IFNULL(`binary_packages_in_repositories`.`last_moved`,\"00-00-0000 00:00:00\")"
- ),
- "del" => array(
- "title" => "to be deleted",
- "label" => "Delete",
- "mysql" => "`binary_packages_in_repositories`.`is_to_be_deleted`"
- )
- );
-
$q_f = $extra_joins . $filter . $fuzzy_filter . " ORDER BY ";
if (array_key_exists("sort", $_GET)) {
- if (isset($sorts[$_GET["sort"]]["mysql"]))
- $q_f .= $sorts[$_GET["sort"]]["mysql"] . ",";
- elseif (isset($sorts[substr($_GET["sort"],1)]["mysql"]))
- $q_f .= $sorts[substr($_GET["sort"],1)]["mysql"] . " DESC,";
+ if (isset($pkglist_sorts[$_GET["sort"]]["mysql"]))
+ $q_f .= $pkglist_sorts[$_GET["sort"]]["mysql"] . ",";
+ elseif (isset($pkglist_sorts[substr($_GET["sort"],1)]["mysql"]))
+ $q_f .= $pkglist_sorts[substr($_GET["sort"],1)]["mysql"] . " DESC,";
}
$q_f .= "`binary_packages`.`pkgname`,`repositories`.`stability`,`repositories`.`name`,`architectures`.`name`";
@@ -355,7 +312,7 @@ if (count($exact_matches) > 0) {
<p><?php print count($exact_matches); ?> exact match<?php if (count($exact_matches) != 1) print "es"; ?> found.</p>
</div>
<?php
- print_package_listing($exact_matches, $sorts, false);
+ print_package_listing($exact_matches, false);
?>
</div>
<?php
@@ -367,7 +324,7 @@ if (count($exact_matches) > 0) {
header_and_footer();
- print_package_listing($fuzzy_matches, $sorts, true);
+ print_package_listing($fuzzy_matches, true);
header_and_footer();