aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2013-03-10 12:19:05 -0400
committerCash Costello <cash.costello@gmail.com>2013-03-10 12:19:05 -0400
commit6494ba26f0f77bbb9bdfb8e4c0d2fd0af862225a (patch)
tree1b8928ffb85efa5d85b48f8c0fa5d2e55639f376
parentf3ff77d0260b9bf9c9d60f3cb4e545e2761412b9 (diff)
downloadelgg-6494ba26f0f77bbb9bdfb8e4c0d2fd0af862225a.tar.gz
elgg-6494ba26f0f77bbb9bdfb8e4c0d2fd0af862225a.tar.bz2
fallback to json in web services
-rw-r--r--CHANGES.txt5
-rw-r--r--engine/lib/web_services.php6
2 files changed, 6 insertions, 5 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index fd9d0eef6..130d0652d 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,6 +1,7 @@
Version 1.8.14
-(X xx, 2013 from https://github.com/Elgg/Elgg/tree/1.8)
+(March xx, 2013 from https://github.com/Elgg/Elgg/tree/1.8)
Contributing Developers:
+ * Cash Costello
* Luciano Lima
* Paweł Sroka
@@ -8,7 +9,7 @@ Version 1.8.14
*
Enhancements:
- * Web services fall back to xml if the viewtype is invalid
+ * Web services fall back to json if the viewtype is invalid
Version 1.8.13
diff --git a/engine/lib/web_services.php b/engine/lib/web_services.php
index b6289184a..b440e3afb 100644
--- a/engine/lib/web_services.php
+++ b/engine/lib/web_services.php
@@ -1267,14 +1267,14 @@ function service_handler($handler, $request) {
$request = explode('/', $request);
// after the handler, the first identifier is response format
- // ex) http://example.org/services/api/rest/xml/?method=test
+ // ex) http://example.org/services/api/rest/json/?method=test
$response_format = array_shift($request);
// Which view - xml, json, ...
if ($response_format && elgg_is_valid_view_type($response_format)) {
elgg_set_viewtype($response_format);
} else {
- // default to xml
- elgg_set_viewtype("xml");
+ // default to json
+ elgg_set_viewtype("json");
}
if (!isset($CONFIG->servicehandler) || empty($handler)) {