summaryrefslogtreecommitdiffstats
path: root/lib/api.php
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2013-05-02 14:51:53 +0200
committerBernhard Posselt <nukeawhale@gmail.com>2013-05-02 14:51:53 +0200
commit11afb2e5a80bb29a48717b0a9b6a9e034fd55497 (patch)
tree19f056c06b5921534b54b8bd430da5fd6b1b9095 /lib/api.php
parent0f38e6ec9caa726be646b6e25f7db10c5fa911ea (diff)
downloadnextcloud-server-11afb2e5a80bb29a48717b0a9b6a9e034fd55497.tar.gz
nextcloud-server-11afb2e5a80bb29a48717b0a9b6a9e034fd55497.zip
respect format output
Diffstat (limited to 'lib/api.php')
-rw-r--r--lib/api.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/api.php b/lib/api.php
index c74ffc1a557..fc76836995b 100644
--- a/lib/api.php
+++ b/lib/api.php
@@ -111,10 +111,11 @@ class OC_API {
}
$response = self::mergeResponses($responses);
$formats = array('json', 'xml');
+
$format = !empty($_GET['format']) && in_array($_GET['format'], $formats) ? $_GET['format'] : 'xml';
OC_User::logout();
-
- self::respond($response);
+
+ self::respond($response, $format);
}
/**