summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2014-10-07 11:07:52 (GMT)
committerAleksander Machniak <alec@alec.pl>2014-10-07 11:07:52 (GMT)
commite86778c8b65f7d61a437e2d17f41bc031c63b58c (patch)
tree9b41b36c105fabb275afdf04686eeb2696e8ba76
parent827bbf733d60c6fe72fbbd9d9c5f9aafa4511122 (diff)
downloadiRony-e86778c8b65f7d61a437e2d17f41bc031c63b58c.tar.gz
Fix listing files on non-first level folders (#3739)
-rw-r--r--lib/Kolab/DAV/Collection.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/Kolab/DAV/Collection.php b/lib/Kolab/DAV/Collection.php
index c050458..d8d39b7 100644
--- a/lib/Kolab/DAV/Collection.php
+++ b/lib/Kolab/DAV/Collection.php
@@ -56,7 +56,7 @@ class Collection extends \Kolab\DAV\Node implements \Sabre\DAV\ICollection
// get subfolders
foreach ($folders as $folder) {
// need root-folders or subfolders of specified folder
- if (!$path_len || ($pos = strpos($folder, $this->path . '/')) === 0) {
+ if (!$path_len || strpos($folder, $this->path . '/') === 0) {
$virtual = false;
// remove path suffix, the list might contain folders (roots) that
@@ -71,12 +71,12 @@ class Collection extends \Kolab\DAV\Node implements \Sabre\DAV\ICollection
$virtual = true;
}
- if (!array_key_exists($folder, $this->children)) {
- $path = Collection::ROOT_DIRECTORY . '/' . $folder;
- if ($path_len) {
- $folder = substr($folder, $path_len + 1);
- }
+ $path = Collection::ROOT_DIRECTORY . '/' . $folder;
+ if ($path_len) {
+ $folder = substr($folder, $path_len + 1);
+ }
+ if (!array_key_exists($folder, $this->children)) {
$this->children[$folder] = new Collection($path, $this, array('virtual' => $virtual));
}
}