Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/format.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/format.php b/lib/format.php
index 72cf531..25748f0 100644
--- a/lib/format.php
+++ b/lib/format.php
@@ -12,15 +12,15 @@ function export_as_requested($content) {
$content["tsv"]=$content["All"];
unset($content["All"]);
}
- if (isset($content["json"]) && isset($_GET["json"])) {
+ if (isset($content["json"]) && array_key_exists("json", $_GET)) {
header ("Content-type: application/json");
print json_encode(
$content["json"],
JSON_UNESCAPED_SLASHES
);
- } elseif (isset($content["tsv"]) && isset($_GET["tsv"])) {
+ } elseif (isset($content["tsv"]) && array_key_exists("tsv", $_GET)) {
header ("Content-type: text/tab-separated-values");
- if (! isset($_GET["no-headers"]))
+ if (! array_key_exists("no-headers", $_GET))
print implode("\t",array_keys($content["tsv"][0])) . "\n";
print implode(
"",