mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-29 22:45:14 -04:00
Add 'hideIf403' option.
This commit is contained in:
parent
25d84fe3df
commit
dfa72936f2
3 changed files with 11 additions and 3 deletions
|
@ -80,9 +80,14 @@ class App {
|
|||
if (is_dir($path)) {
|
||||
if ($dir = opendir($path)) {
|
||||
while (($name = readdir($dir)) !== false) {
|
||||
if (!$this->is_ignored($name) && !$this->is_ignored($this->to_url($path) . $name)) {
|
||||
$names[] = $name;
|
||||
if (
|
||||
$this->is_ignored($name)
|
||||
|| $this->is_ignored($this->to_url($path) . $name)
|
||||
|| (!is_readable($path .'/'. $name) && $this->options["view"]["hideIf403"])
|
||||
) {
|
||||
continue;
|
||||
}
|
||||
$names[] = $name;
|
||||
}
|
||||
closedir($dir);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue