From fe2e6502e6911932168738b650ede23c6972aa7e Mon Sep 17 00:00:00 2001 From: ghost Date: Fri, 2 Feb 2024 13:04:22 +0200 Subject: [PATCH] add index blacklist settings --- src/Dokuwiki/Filesystem.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Dokuwiki/Filesystem.php b/src/Dokuwiki/Filesystem.php index 407684a..1217ca6 100644 --- a/src/Dokuwiki/Filesystem.php +++ b/src/Dokuwiki/Filesystem.php @@ -163,11 +163,11 @@ class Filesystem return $path; } - private function _index(string $path): void + private function _index(string $path, ?array $blacklist = ['.', '..', 'sidebar.txt', '__template.txt']): void { foreach ((array) scandir($path) as $file) { - if (in_array($file, ['.', '..']) || str_starts_with($file, '__')) + if (in_array($file, $blacklist)) { continue; }