diff options
author | Tom Needham <tom@owncloud.com> | 2012-07-30 16:04:09 +0000 |
---|---|---|
committer | Tom Needham <tom@owncloud.com> | 2012-07-30 16:04:09 +0000 |
commit | 2f84a8d74627cb20cfae1ac4c004af393b8b07de (patch) | |
tree | 515b963bdb1176bc3a4c1be5a82656dfbcbab8a3 /lib/api.php | |
parent | c4d87c1aff470d77a90b9969160ef0237d93e68b (diff) | |
download | nextcloud-server-2f84a8d74627cb20cfae1ac4c004af393b8b07de.tar.gz nextcloud-server-2f84a8d74627cb20cfae1ac4c004af393b8b07de.zip |
Merge the responses recursively
Diffstat (limited to 'lib/api.php')
-rw-r--r-- | lib/api.php | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/api.php b/lib/api.php index 02c3f77e5c2..757e53226b9 100644 --- a/lib/api.php +++ b/lib/api.php @@ -86,7 +86,6 @@ class OC_API { $finalresponse = array(); $numresponses = count($responses); - // TODO - This is only a temporary merge. If keys match and value is another array we want to compare deeper in the array foreach($responses as $response){ if(is_int($response) && empty($finalresponse)){ $finalresponse = $response; @@ -95,13 +94,12 @@ class OC_API { if(is_array($response)){ // Shipped apps win if(OC_App::isShipped($response['app'])){ - $finalresponse = array_merge($finalresponse, $response); + $finalresponse = array_merge_recursive($finalresponse, $response); } else { - $finalresponse = array_merge($response, $finalresponse); + $finalresponse = array_merge_recursive($response, $finalresponse); } } } - // END TODO return $finalresponse; } |