From 272bae0fa77072f4e6676bb49ce9ba815d93940c Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Tue, 10 Jul 2018 09:00:24 +0200 Subject: lib/format.php new --- mirrors/status.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'mirrors/status.php') diff --git a/mirrors/status.php b/mirrors/status.php index 79ca3ee..d9f3274 100644 --- a/mirrors/status.php +++ b/mirrors/status.php @@ -2,6 +2,7 @@ require_once "../init.php"; require_once BASE . "/lib/mysql.php"; +require_once BASE . "/lib/format.php"; $cutoff = 86400; @@ -78,9 +79,4 @@ $content = array( "urls" => $urls ); -if (isset($_GET["json"])) { - header ("Content-type: application/json"); - print json_encode($content,JSON_UNESCAPED_SLASHES); -} else { - print "Unknown output format."; -} +export_as_requested($content); -- cgit v1.2.3-54-g00ecf