[Pkg-owncloud-commits] [php-sabredav] 52/163: Few more tweaks from @staabm.

David Prévot taffit at moszumanska.debian.org
Tue May 20 18:54:53 UTC 2014


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

taffit pushed a commit to annotated tag upstream/2.0.0_beta1
in repository php-sabredav.

commit fe683aaf01b9ab99360352231a7f5c18a1355fb3
Author: Evert Pot <evert at rooftopsolutions.nl>
Date:   Tue Apr 8 17:59:08 2014 -0400

    Few more tweaks from @staabm.
---
 lib/Sabre/DAV/FSExt/Node.php | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/lib/Sabre/DAV/FSExt/Node.php b/lib/Sabre/DAV/FSExt/Node.php
index bbeb827..e0c368c 100644
--- a/lib/Sabre/DAV/FSExt/Node.php
+++ b/lib/Sabre/DAV/FSExt/Node.php
@@ -27,21 +27,19 @@ abstract class Node extends DAV\FS\Node implements DAV\IProperties {
      * To update specific properties, call the 'handle' method on this object.
      * Read the PropPatch documentation for more information.
      *
-     * @param array $mutations
-     * @return bool|array
+     * @param PropPatch $propPatch
+     * @return void
      */
-    public function propPatch(PropPatch $proppatch) {
+    public function propPatch(PropPatch $propPatch) {
 
-        $proppatch->handleRemaining(function(array $properties) {
+        $propPatch->handleRemaining(function(array $properties) {
 
             $resourceData = $this->getResourceData();
             foreach($properties as $propertyName=>$propertyValue) {
 
                 // If it was null, we need to delete the property
                 if (is_null($propertyValue)) {
-                    if (isset($resourceData['properties'][$propertyName])) {
-                        unset($resourceData['properties'][$propertyName]);
-                    }
+                    unset($resourceData['properties'][$propertyName]);
                 } else {
                     $resourceData['properties'][$propertyName] = $propertyValue;
                 }
@@ -63,7 +61,7 @@ abstract class Node extends DAV\FS\Node implements DAV\IProperties {
      * @param array $properties
      * @return array
      */
-    function getProperties($properties) {
+    public function getProperties($properties) {
 
         $resourceData = $this->getResourceData();
 
@@ -206,7 +204,7 @@ abstract class Node extends DAV\FS\Node implements DAV\IProperties {
 
         // Unserializing and checking if the resource file contains data for this file
         $data = unserialize($data);
-        if (isset($data[$this->getName()])) unset($data[$this->getName()]);
+        unset($data[$this->getName()]);
         ftruncate($handle,0);
         rewind($handle);
         fwrite($handle,serialize($data));

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