From 0257d660ad932403629e6c8ad507581b266e269f Mon Sep 17 00:00:00 2001 From: redmatrix Date: Thu, 11 Aug 2016 18:09:48 -0700 Subject: move error processing back inside the function --- include/api.php | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'include') diff --git a/include/api.php b/include/api.php index 9725c6dc0..90e88640b 100644 --- a/include/api.php +++ b/include/api.php @@ -143,31 +143,31 @@ require_once('include/api_auth.php'); } } - } + - header("HTTP/1.1 404 Not Found"); - logger('API call not implemented: ' . App::$query_string . ' - ' . print_r($_REQUEST,true)); - $r = 'not implemented'; - switch($type){ - case "xml": - header ("Content-Type: text/xml"); - return ''."\n".$r; - break; - case "json": - header ("Content-Type: application/json"); - return json_encode(array('error' => 'not implemented')); - break; - case "rss": - header ("Content-Type: application/rss+xml"); - return ''."\n".$r; - break; - case "atom": - header ("Content-Type: application/atom+xml"); - return ''."\n".$r; - break; + header("HTTP/1.1 404 Not Found"); + logger('API call not implemented: ' . App::$query_string . ' - ' . print_r($_REQUEST,true)); + $r = 'not implemented'; + switch($type){ + case "xml": + header ("Content-Type: text/xml"); + return ''."\n".$r; + break; + case "json": + header ("Content-Type: application/json"); + return json_encode(array('error' => 'not implemented')); + break; + case "rss": + header ("Content-Type: application/rss+xml"); + return ''."\n".$r; + break; + case "atom": + header ("Content-Type: application/atom+xml"); + return ''."\n".$r; + break; + } } - /** * RSS extra info */ -- cgit v1.2.3