mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-08-14 01:04:13 +02:00
Switch to scandir.
This commit is contained in:
@@ -118,18 +118,15 @@ class App {
|
|||||||
|
|
||||||
$names = array();
|
$names = array();
|
||||||
if (is_dir($path)) {
|
if (is_dir($path)) {
|
||||||
if ($dir = opendir($path)) {
|
foreach (scandir($path) as $name) {
|
||||||
while (($name = readdir($dir)) !== false) {
|
if (
|
||||||
if (
|
$this->is_hidden($name)
|
||||||
$this->is_hidden($name)
|
|| $this->is_hidden($this->to_url($path) . $name)
|
||||||
|| $this->is_hidden($this->to_url($path) . $name)
|
|| (!is_readable($path .'/'. $name) && $this->options["view"]["hideIf403"])
|
||||||
|| (!is_readable($path .'/'. $name) && $this->options["view"]["hideIf403"])
|
) {
|
||||||
) {
|
continue;
|
||||||
continue;
|
|
||||||
}
|
|
||||||
$names[] = $name;
|
|
||||||
}
|
}
|
||||||
closedir($dir);
|
$names[] = $name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $names;
|
return $names;
|
||||||
|
Reference in New Issue
Block a user