From: Bernhard Posselt Date: Thu, 2 May 2013 12:51:53 +0000 (+0200) Subject: respect format output X-Git-Tag: v5.0.6~16 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e3c7386be4a0ed1165bb49d814eda43fe43aeb31;p=nextcloud-server.git respect format output --- 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); } /**