[Pkg-owncloud-commits] [php-sabredav] 238/275: Thnx @staabm.

David Prévot taffit at moszumanska.debian.org
Thu Sep 25 14:56:14 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 e7c0d804180fb646e0ba138d266259c7f571431c
Author: Evert Pot <evert at rooftopsolutions.nl>
Date:   Mon Sep 15 22:27:59 2014 +0100

    Thnx @staabm.
---
 lib/DAV/Tree.php | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/lib/DAV/Tree.php b/lib/DAV/Tree.php
index d7d72c5..06022eb 100644
--- a/lib/DAV/Tree.php
+++ b/lib/DAV/Tree.php
@@ -24,11 +24,12 @@ class Tree {
     protected $rootNode;
 
     /**
-     * This is the node cache. Accessed nodes are stored here
+     * This is the node cache. Accessed nodes are stored here.
+     * Arrays keys are path names, values are the actual nodes.
      *
      * @var array
      */
-    protected $cache = array();
+    protected $cache = [];
 
     /**
      * Creates the object
@@ -192,9 +193,10 @@ class Tree {
 
         $node = $this->getNodeForPath($path);
         $children = $node->getChildren();
+        $basePath = trim($path,'/') . '/';
         foreach($children as $child) {
 
-            $this->cache[trim($path,'/') . '/' . $child->getName()] = $child;
+            $this->cache[$basePath . $child->getName()] = $child;
 
         }
         return $children;

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