Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/packages/index.php
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-05-03 21:54:50 +0200
committerErich Eckner <git@eckner.net>2018-05-03 21:54:50 +0200
commit8ac70b82acf74e409cfacdfd0c9c59ca0b0bc6e7 (patch)
treead4958e41a9fa72cfb24368cbdc493008836a7a9 /packages/index.php
parent0eceb8c7bbe0b68311e0bc296fde9b13004f96bb (diff)
packages/: show to-be-deleted flag
Diffstat (limited to 'packages/index.php')
-rw-r--r--packages/index.php42
1 files changed, 39 insertions, 3 deletions
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 "&nbsp;";
print "\n";
print " </td>\n";
+ print " <td>\n";
+ print " ";
+ if ($row["is_to_be_deleted"])
+ print "to be deleted";
+ else
+ print "&nbsp;";
+ print "\n";
+ print " </td>\n";
print " </tr>\n";
if ($oddity == "odd" )
$oddity = "even";
@@ -327,6 +347,22 @@ if (isset($_GET["q"]))
</select>
</div>
<div>
+ <label for="id_del" title="Limit results based on to-be-deleted flag">Delete</label><select id="id_del" name="del">
+<?php
+ $del_drop_down = array("All", "To Be Deleted", "Not To Be Deleted");
+ foreach ($del_drop_down as $label) {
+ print " <option value=\"";
+ if ($label != "All")
+ print $label;
+ print "\"";
+ if ($_GET["del"]==$label)
+ print " selected=\"selected\"";
+ print ">" . $label . "</option>\n";
+ }
+?>
+ </select>
+ </div>
+ <div>
<label>&nbsp;</label>
<input title="Search for packages using this criteria" type="submit" value="Search">
</div>