[Pkg-owncloud-commits] [owncloud] 27/111: Merge branch 'ocs_api_fix_success_code' into oc_api_tests
David Prévot
taffit at moszumanska.debian.org
Wed Nov 20 21:38:37 UTC 2013
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository owncloud.
commit b06682b7fb6ccc09fef55da2bb47d8e1612130d9
Merge: 00944a3 17e45e2
Author: tomneedham <tom at owncloud.com>
Date: Thu Nov 14 00:41:04 2013 +0000
Merge branch 'ocs_api_fix_success_code' into oc_api_tests
lib/private/api.php | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --cc lib/private/api.php
index ac9bb8b,8307f20..45e7f18
--- a/lib/private/api.php
+++ b/lib/private/api.php
@@@ -180,13 -177,24 +180,24 @@@ class OC_API
$data = array();
foreach($responses as $app => $response) {
- if(OC_App::isShipped($app)) {
- $data = array_merge_recursive($response->getData(), $data);
+ if($response['shipped']) {
+ $data = array_merge_recursive($response['response']->getData(), $data);
} else {
- $data = array_merge_recursive($data, $response->getData());
+ $data = array_merge_recursive($data, $response['response']->getData());
}
+ $codes[] = $response->getStatusCode();
}
- $result = new OC_OCS_Result($data, 100);
+
+ // Use any non 100 status codes
+ $statusCode = 100;
+ foreach($codes as $code) {
+ if($code != 100) {
+ $statusCode = $code;
+ break;
+ }
+ }
+
+ $result = new OC_OCS_Result($data, $statusCode);
return $result;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list