diff options
Diffstat (limited to 'lib/private/api.php')
-rw-r--r-- | lib/private/api.php | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/lib/private/api.php b/lib/private/api.php index ac9bb8b0688..45e7f18bd4e 100644 --- a/lib/private/api.php +++ b/lib/private/api.php @@ -173,7 +173,7 @@ class OC_API { $response = reset($thirdparty['failed']); return $response; } else { - $responses = array_merge($shipped['succeeded'], $thirdparty['succeeded']); + $responses = $thirdparty['succeeded']; } // Merge the successful responses $meta = array(); @@ -185,8 +185,19 @@ class OC_API { } else { $data = array_merge_recursive($data, $response['response']->getData()); } + $codes[] = $response->getStatusCode(); + } + + // Use any non 100 status codes + $statusCode = 100; + foreach($codes as $code) { + if($code != 100) { + $statusCode = $code; + break; + } } - $result = new OC_OCS_Result($data, 100); + + $result = new OC_OCS_Result($data, $statusCode); return $result; } |