Skip to content

Commit 8eb9a21

Browse files
committed
1 parent 93654e7 commit 8eb9a21

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

front_end/openVRE/public/phplib/mongoDB.inc.php

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,17 +74,11 @@ function collectGSFilesFromDirRecursive($dirId, &$files, $onlyVisible)
7474
return;
7575
}
7676

77-
$childIds = $dirData['files'];
78-
foreach ($GLOBALS['filesCol']->find(array('parentDir' => $dirId), array('projection' => array('_id' => 1))) as $doc) {
79-
if (!in_array($doc['_id'], $childIds, true)) {
80-
$childIds[] = $doc['_id'];
81-
}
82-
}
83-
if (count($childIds) == 0) {
77+
if (count($dirData['files']) == 0) {
8478
return;
8579
}
8680

87-
foreach ($childIds as $d) {
81+
foreach ($dirData['files'] as $d) {
8882
$fData = $onlyVisible
8983
? getGSFile_filteredBy($d, array('visible' => array('$ne' => false)))
9084
: getGSFile_fromId($d);

0 commit comments

Comments
 (0)