[Pkg-owncloud-commits] [php-sabredav] 01/10: fix client prop patch should add {DAV:}prop parent node

David Prévot taffit at moszumanska.debian.org
Sat Sep 5 15:24:03 UTC 2015


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

taffit pushed a commit to tag 3.0.4
in repository php-sabredav.

commit c752450f38c56b765d94173586784f48acdb7371
Author: Jeremy Denoun <jeremy.denoun at iguanesolutions.com>
Date:   Tue Aug 11 19:39:37 2015 +0200

    fix client prop patch should add {DAV:}prop parent node
---
 lib/DAV/Xml/Request/PropPatch.php | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/lib/DAV/Xml/Request/PropPatch.php b/lib/DAV/Xml/Request/PropPatch.php
index 848e531..838d98e 100644
--- a/lib/DAV/Xml/Request/PropPatch.php
+++ b/lib/DAV/Xml/Request/PropPatch.php
@@ -51,11 +51,15 @@ class PropPatch implements Element {
 
         foreach ($this->properties as $propertyName => $propertyValue) {
 
-            if (is_null($propertyValue)) {
-                $writer->write(['{DAV:}remove' => [$propertyName => $propertyValue]]);
-            } else {
-                $writer->write(['{DAV:}set' => [$propertyName => $propertyValue]]);
-            }
+	  if (is_null($propertyValue)) {
+	    $writer->startElement("{DAV:}remove");
+	    $writer->write(['{DAV:}prop' => [$propertyName => $propertyValue]]);
+	    $writer->endElement();
+	  } else {
+	    $writer->startElement("{DAV:}set");
+	    $writer->write(['{DAV:}prop' => [$propertyName => $propertyValue]]);
+	    $writer->endElement();
+	  }
 
         }
 

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