mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-25 12:34:47 -04:00
Switch to scandir.
This commit is contained in:
parent
18a6f20390
commit
0cfc9a0eaa
1 changed files with 8 additions and 11 deletions
|
@ -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;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue