aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-08-11 18:09:48 -0700
committerredmatrix <git@macgirvin.com>2016-08-11 18:09:48 -0700
commit0257d660ad932403629e6c8ad507581b266e269f (patch)
tree94c8ab83301a3f54387fb24515c04461f9b9d53c /include
parentc63deda71a8acc73eaa05fb045f214f93c3aa347 (diff)
downloadvolse-hubzilla-0257d660ad932403629e6c8ad507581b266e269f.tar.gz
volse-hubzilla-0257d660ad932403629e6c8ad507581b266e269f.tar.bz2
volse-hubzilla-0257d660ad932403629e6c8ad507581b266e269f.zip
move error processing back inside the function
Diffstat (limited to 'include')
-rw-r--r--include/api.php44
1 files changed, 22 insertions, 22 deletions
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 = '<status><error>not implemented</error></status>';
- switch($type){
- case "xml":
- header ("Content-Type: text/xml");
- return '<?xml version="1.0" encoding="UTF-8"?>'."\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 '<?xml version="1.0" encoding="UTF-8"?>'."\n".$r;
- break;
- case "atom":
- header ("Content-Type: application/atom+xml");
- return '<?xml version="1.0" encoding="UTF-8"?>'."\n".$r;
- break;
+ header("HTTP/1.1 404 Not Found");
+ logger('API call not implemented: ' . App::$query_string . ' - ' . print_r($_REQUEST,true));
+ $r = '<status><error>not implemented</error></status>';
+ switch($type){
+ case "xml":
+ header ("Content-Type: text/xml");
+ return '<?xml version="1.0" encoding="UTF-8"?>'."\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 '<?xml version="1.0" encoding="UTF-8"?>'."\n".$r;
+ break;
+ case "atom":
+ header ("Content-Type: application/atom+xml");
+ return '<?xml version="1.0" encoding="UTF-8"?>'."\n".$r;
+ break;
+ }
}
-
/**
* RSS extra info
*/