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-07-10 14:18:22 +0200
committerErich Eckner <git@eckner.net>2018-07-10 14:18:22 +0200
commit271dbaf6d80a821cc6657fde96314112ee3394ce (patch)
treee41723f0af4885e0e14156f1f64c5497f9ca14e4 /packages/index.php
parentd5cf1bf5a6c0925f9e3815f9b6c33b26a5b67b06 (diff)
packages/index.php: allow json/tsv export of package searches
Diffstat (limited to 'packages/index.php')
-rw-r--r--packages/index.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/packages/index.php b/packages/index.php
index a4945ff..1347aa9 100644
--- a/packages/index.php
+++ b/packages/index.php
@@ -3,6 +3,7 @@ require_once "../init.php";
require_once BASE . "/lib/mysql.php";
require_once BASE . "/lib/style.php";
+require_once BASE . "/lib/format.php";
foreach (array("bugs","sort","del","uses_upstream","uses_modification") as $expected_param)
@@ -341,6 +342,24 @@ require_once BASE . "/lib/style.php";
};
+ if (isset($_GET["exact"])) {
+ export_as_requested(
+ array(
+ "All" => $exact_matches
+ )
+ );
+ die();
+ };
+
+ if (isset($_GET["fuzzy"])) {
+ export_as_requested(
+ array(
+ "All" => $fuzzy_matches
+ )
+ );
+ die();
+ };
+
print_header("Package Search");
?>