commit db48e2d64acfcd744ce63f94c595e228ff81586b
parent f8e0e2c075e09d40da5ba2da7d1300be09849a7c
Author: markseu <mark2011@mayberg.se>
Date: Fri, 5 Apr 2019 14:25:53 +0200
Improved file scanning, for Igor
Diffstat:
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/system/extensions/core.php b/system/extensions/core.php
@@ -1389,9 +1389,9 @@ class YellowContent {
foreach ($this->scanLocation($location) as $page) {
if ($page->isAvailable() && ($page->isVisible() || $showInvisible)) {
if (!$this->yellow->lookup->isRootLocation($page->location) && is_readable($page->fileName)) $pages->append($page);
- if (!$this->yellow->lookup->isFileLocation($page->location) && $levelMax!=0) {
- $pages->merge($this->getChildrenRecursive($page->location, $showInvisible, $levelMax));
- }
+ }
+ if (!$this->yellow->lookup->isFileLocation($page->location) && $levelMax!=0) {
+ $pages->merge($this->getChildrenRecursive($page->location, $showInvisible, $levelMax));
}
}
return $pages;
@@ -1517,9 +1517,9 @@ class YellowMedia {
foreach ($this->scanLocation($location) as $file) {
if ($file->isAvailable() && ($file->isVisible() || $showInvisible)) {
if ($this->yellow->lookup->isFileLocation($file->location)) $files->append($file);
- if (!$this->yellow->lookup->isFileLocation($file->location) && $levelMax!=0) {
- $files->merge($this->getChildrenRecursive($file->location, $showInvisible, $levelMax));
- }
+ }
+ if (!$this->yellow->lookup->isFileLocation($file->location) && $levelMax!=0) {
+ $files->merge($this->getChildrenRecursive($file->location, $showInvisible, $levelMax));
}
}
return $files;