From e3c7386be4a0ed1165bb49d814eda43fe43aeb31 Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Thu, 2 May 2013 14:51:53 +0200 Subject: [PATCH] respect format output --- lib/api.php | 5 +++-- 1 file 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); } /** -- 2.39.5