mirror of
https://github.com/lrsjng/h5ai
synced 2025-12-06 08:52:45 +01:00
Merge ee707f5866 into aa94de4945
This commit is contained in:
commit
c6f463bbdc
1 changed files with 7 additions and 2 deletions
|
|
@ -189,7 +189,7 @@ class Context {
|
|||
$folder = Item::get($this, $this->to_path($href), $cache);
|
||||
|
||||
// add content of subfolders
|
||||
if ($what >= 2 && $folder !== null) {
|
||||
if ($what >= 3 && $folder !== null) {
|
||||
foreach ($folder->get_content($cache) as $item) {
|
||||
$item->get_content($cache);
|
||||
}
|
||||
|
|
@ -197,11 +197,16 @@ class Context {
|
|||
}
|
||||
|
||||
// add content of this folder and all parent folders
|
||||
while ($what >= 1 && $folder !== null) {
|
||||
while ($what >= 2 && $folder !== null) {
|
||||
$folder->get_content($cache);
|
||||
$folder = $folder->get_parent($cache);
|
||||
}
|
||||
|
||||
// only add the requested folder (less fstat overhead)
|
||||
if ($what == 1 && $folder !== null) {
|
||||
$folder->get_content($cache);
|
||||
}
|
||||
|
||||
uasort($cache, ['Item', 'cmp']);
|
||||
$result = [];
|
||||
foreach ($cache as $p => $item) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue