Browse Source

add index blacklist settings

main
ghost 9 months ago
parent
commit
fe2e6502e6
  1. 4
      src/Dokuwiki/Filesystem.php

4
src/Dokuwiki/Filesystem.php

@ -163,11 +163,11 @@ class Filesystem @@ -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;
}

Loading…
Cancel
Save