From 271dbaf6d80a821cc6657fde96314112ee3394ce Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Tue, 10 Jul 2018 14:18:22 +0200 Subject: packages/index.php: allow json/tsv export of package searches --- packages/index.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'packages') 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"); ?> -- cgit v1.2.3-70-g09d2