From 8ac70b82acf74e409cfacdfd0c9c59ca0b0bc6e7 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Thu, 3 May 2018 21:54:50 +0200 Subject: packages/: show to-be-deleted flag --- packages/index.php | 42 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 39 insertions(+), 3 deletions(-) (limited to 'packages/index.php') diff --git a/packages/index.php b/packages/index.php index c0f4921..53bfb1d 100644 --- a/packages/index.php +++ b/packages/index.php @@ -3,7 +3,7 @@ include "lib/mysql.php"; include "lib/style.php"; - foreach (array("bugs","sort") as $expected_param) + foreach (array("bugs","sort","del") as $expected_param) if (! isset($_GET[$expected_param])) $_GET[$expected_param] = ""; @@ -49,6 +49,11 @@ if ($_GET["bugs"] == "No Bugs") $filter .= " AND NOT `binary_packages`.`has_issues`"; + if ($_GET["del"] == "To Be Deleted") + $filter .= " AND `binary_packages`.`is_to_be_deleted`"; + if ($_GET["del"] == "Not To Be Deleted") + $filter .= " AND NOT `binary_packages`.`is_to_be_deleted`"; + if (isset($_GET["q"])) { $exact_filter = " AND `binary_packages`.`pkgname` = from_base64(\"".base64_encode($_GET["q"])."\")"; $fuzzy_filter = " AND `binary_packages`.`pkgname` LIKE from_base64(\"".base64_encode("%".$_GET["q"]."%")."\")"; @@ -78,7 +83,8 @@ "`binary_packages`.`sub_pkgrel`) AS `version`," . "IF(`binary_packages`.`has_issues`,1,0) AS `has_issues`," . "`build_assignments`.`return_date` AS `build_date`," . - "`binary_packages`.`last_moved` AS `move_date`" . + "`binary_packages`.`last_moved` AS `move_date`," . + "IF(`binary_packages`.`is_to_be_deleted`,1,0) AS `is_to_be_deleted`" . $query ); $exact_matches = array(); @@ -120,6 +126,11 @@ "title" => "last update", "label" => "Last Updated", "mysql" => "IFNULL(`binary_packages`.`last_moved`,\"00-00-0000 00:00:00\")" + ), + "del" => array( + "title" => "to be deleted", + "label" => "Delete", + "mysql" => "`binary_packages`.`is_to_be_deleted`" ) ); @@ -162,7 +173,8 @@ "`binary_packages`.`sub_pkgrel`) AS `version`," . "IF(`binary_packages`.`has_issues`,1,0) AS `has_issues`," . "`build_assignments`.`return_date` AS `build_date`," . - "`binary_packages`.`last_moved` AS `move_date`" . + "`binary_packages`.`last_moved` AS `move_date`," . + "IF(`binary_packages`.`is_to_be_deleted`,1,0) AS `is_to_be_deleted`" . $query . " LIMIT " . (($page-1)*100) . ", 100" ); @@ -211,6 +223,14 @@ print " "; print "\n"; print " \n"; + print " \n"; + print " "; + if ($row["is_to_be_deleted"]) + print "to be deleted"; + else + print " "; + print "\n"; + print " \n"; print " \n"; if ($oddity == "odd" ) $oddity = "even"; @@ -323,6 +343,22 @@ if (isset($_GET["q"])) print " selected=\"selected\""; print ">" . $label . "\n"; } +?> + + +
+
-- cgit v1.2.3-70-g09d2