Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/format.php
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-02-18 20:12:17 +0100
committerErich Eckner <git@eckner.net>2019-02-18 20:12:17 +0100
commit4c6b074e85d7d8e97b9f125f5fbc2949bc8839dd (patch)
treeb1049ef75f830be56aa5dbba951872d794b11b2a /lib/format.php
parent4376c50ded25fff8ab6c59c045522091b3eb038b (diff)
buildmaster/build-list-links.php,buildmaster/build-list.php,buildmaster/build-slaves.php,buildmaster/deletion-links.php,buildmaster/dependencies.php,buildmaster/log.php,buildmaster/mysql-issues.php,buildmaster/statistics.php,buildmaster/todos.php,lib/format.php,mirrors/index.php,packages/index.php: isset($_GET[$x]) -> array_key_exists($x, $_GET)
Diffstat (limited to 'lib/format.php')
-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(
"",