[Pkg-owncloud-commits] [php-sabredav] 40/66: Use new splitted getBody() methods (sabre-http).

David Prévot taffit at moszumanska.debian.org
Sat Jan 18 20:08:21 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository php-sabredav.

commit 54dedeef8194533b4fa59092ff3ceb799bb7429e
Author: Jan Pieper <kontakt at jan-pieper.info>
Date:   Fri Jan 3 17:43:04 2014 +0100

    Use new splitted getBody() methods (sabre-http).
    
    * See https://github.com/fruux/sabre-http/commit/7ef0ec8c0ccca33bc6d7ad8120b61ffb22f6def9
---
 lib/Sabre/CalDAV/Plugin.php                 |  2 +-
 lib/Sabre/CalDAV/SharingPlugin.php          |  2 +-
 lib/Sabre/DAV/Client.php                    |  2 +-
 lib/Sabre/DAV/CorePlugin.php                | 10 +++++-----
 lib/Sabre/DAV/Locks/Plugin.php              |  2 +-
 lib/Sabre/DAV/TemporaryFileFilterPlugin.php |  2 +-
 lib/Sabre/DAVACL/Plugin.php                 |  2 +-
 7 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/lib/Sabre/CalDAV/Plugin.php b/lib/Sabre/CalDAV/Plugin.php
index f30da49..4fca25d 100644
--- a/lib/Sabre/CalDAV/Plugin.php
+++ b/lib/Sabre/CalDAV/Plugin.php
@@ -315,7 +315,7 @@ class Plugin extends DAV\ServerPlugin {
         //    throw new \Sabre\DAV\Exception\Forbidden('iCal has major bugs in it\'s RFC3744 support. Therefore we are left with no other choice but disabling this feature.');
         //}
 
-        $body = $request->getBody($asString = true);
+        $body = $request->getBodyAsString();
         $path = $request->getPath();
 
         $properties = array();
diff --git a/lib/Sabre/CalDAV/SharingPlugin.php b/lib/Sabre/CalDAV/SharingPlugin.php
index 21c23b5..cb8c89a 100644
--- a/lib/Sabre/CalDAV/SharingPlugin.php
+++ b/lib/Sabre/CalDAV/SharingPlugin.php
@@ -276,7 +276,7 @@ class SharingPlugin extends DAV\ServerPlugin {
             return;
         }
 
-        $requestBody = $request->getBody($asString = true);
+        $requestBody = $request->getBodyAsString();
 
         // If this request handler could not deal with this POST request, it
         // will return 'null' and other plugins get a chance to handle the
diff --git a/lib/Sabre/DAV/Client.php b/lib/Sabre/DAV/Client.php
index 379b4bd..2f4c2f8 100644
--- a/lib/Sabre/DAV/Client.php
+++ b/lib/Sabre/DAV/Client.php
@@ -391,7 +391,7 @@ class Client extends HTTP\Client {
 
         $response = $this->send(new HTTP\Request($method, $url, $headers, $body));
         return [
-            'body' => $response->getBody($asString = true),
+            'body' => $response->getBodyAsString(),
             'statusCode' => (int)$response->getStatus(),
             'headers' => array_change_key_case($response->getHeaders()),
         ];
diff --git a/lib/Sabre/DAV/CorePlugin.php b/lib/Sabre/DAV/CorePlugin.php
index e0f624f..daf03f1 100644
--- a/lib/Sabre/DAV/CorePlugin.php
+++ b/lib/Sabre/DAV/CorePlugin.php
@@ -312,7 +312,7 @@ class CorePlugin extends ServerPlugin {
         $path = $request->getPath();
 
         $requestedProperties = $this->server->parsePropFindRequest(
-            $request->getBody($asString = true)
+            $request->getBodyAsString()
         );
 
         $depth = $this->server->getHTTPDepth(1);
@@ -363,7 +363,7 @@ class CorePlugin extends ServerPlugin {
         $this->server->checkPreconditions();
 
         $newProperties = $this->server->parsePropPatchRequest(
-            $request->getBody($asString = true)
+            $request->getBodyAsString()
         );
 
         $result = $this->server->updateProperties($path, $newProperties);
@@ -418,7 +418,7 @@ class CorePlugin extends ServerPlugin {
      */
     public function httpPut(RequestInterface $request, ResponseInterface $response) {
 
-        $body = $request->getBody();
+        $body = $request->getBodyAsStream();
         $path = $request->getPath();
 
         // Intercepting Content-Range
@@ -542,7 +542,7 @@ class CorePlugin extends ServerPlugin {
      */
     public function httpMkcol(RequestInterface $request, ResponseInterface $response) {
 
-        $requestBody = $request->getBody($asString = true);
+        $requestBody = $request->getBodyAsString();
         $path = $request->getPath();
 
         if ($requestBody) {
@@ -695,7 +695,7 @@ class CorePlugin extends ServerPlugin {
 
         $path = $request->getPath();
 
-        $body = $request->getBody($asString = true);
+        $body = $request->getBodyAsString();
         $dom = XMLUtil::loadDOMDocument($body);
 
         $reportName = XMLUtil::toClarkNotation($dom->firstChild);
diff --git a/lib/Sabre/DAV/Locks/Plugin.php b/lib/Sabre/DAV/Locks/Plugin.php
index fb0554b..d279cb4 100644
--- a/lib/Sabre/DAV/Locks/Plugin.php
+++ b/lib/Sabre/DAV/Locks/Plugin.php
@@ -194,7 +194,7 @@ class Plugin extends DAV\ServerPlugin {
 
         $existingLocks = $this->getLocks($uri);
 
-        if ($body = $request->getBody($asStrign = true)) {
+        if ($body = $request->getBodyAsString()) {
             // This is a new lock request
 
             $existingLock = null;
diff --git a/lib/Sabre/DAV/TemporaryFileFilterPlugin.php b/lib/Sabre/DAV/TemporaryFileFilterPlugin.php
index 2c45d70..f7e611f 100644
--- a/lib/Sabre/DAV/TemporaryFileFilterPlugin.php
+++ b/lib/Sabre/DAV/TemporaryFileFilterPlugin.php
@@ -264,7 +264,7 @@ class TemporaryFileFilterPlugin extends ServerPlugin {
         $hR->setStatus(207);
         $hR->setHeader('Content-Type','application/xml; charset=utf-8');
 
-        $this->server->parsePropFindRequest($request->getBody($asString = true));
+        $this->server->parsePropFindRequest($request->getBodyAsString());
 
         $properties = [
             'href' => $request->getPath(),
diff --git a/lib/Sabre/DAVACL/Plugin.php b/lib/Sabre/DAVACL/Plugin.php
index dc5ead3..7841bc3 100644
--- a/lib/Sabre/DAVACL/Plugin.php
+++ b/lib/Sabre/DAVACL/Plugin.php
@@ -1033,7 +1033,7 @@ class Plugin extends DAV\ServerPlugin {
     public function httpAcl(RequestInterface $request, ResponseInterface $response) {
 
         $path = $request->getPath();
-        $body = $request->getBody($asString = true);
+        $body = $request->getBodyAsString();
         $dom = DAV\XMLUtil::loadDOMDocument($body);
 
         $newAcl =

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/php-sabredav.git



More information about the Pkg-owncloud-commits mailing list