[Pkg-owncloud-commits] [owncloud] 31/111: Return failed shipped responses over succedded shipped responses

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 ca5c39a3a1ff624a0bbcb39456c93856b8983b51
Author: tomneedham <tom at owncloud.com>
Date:   Thu Nov 14 01:14:37 2013 +0000

    Return failed shipped responses over succedded shipped responses
---
 lib/private/api.php |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/private/api.php b/lib/private/api.php
index 76e0095..8ff6c3e 100644
--- a/lib/private/api.php
+++ b/lib/private/api.php
@@ -159,15 +159,15 @@ class OC_API {
 		}
 
 		// Remove any error responses if there is one shipped response that succeeded
-		if(!empty($shipped['succeeded'])) {
-			$responses = array_merge($shipped['succeeded'], $thirdparty['succeeded']);
-		} else if(!empty($shipped['failed'])) {
+		if(!empty($shipped['failed'])) {
 			// Which shipped response do we use if they all failed?
 			// They may have failed for different reasons (different status codes)
 			// Which reponse code should we return?
 			// Maybe any that are not OC_API::RESPOND_SERVER_ERROR
 			$response = reset($shipped['failed']);
 			return $response['response'];
+		} elseif(!empty($shipped['succeeded'])) {
+			$responses = array_merge($shipped['succeeded'], $thirdparty['succeeded']);
 		} elseif(!empty($thirdparty['failed'])) {
 			// Return the third party failure result
 			$response = reset($thirdparty['failed']);

-- 
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