Add 'hideIf403' option.

This commit is contained in:
Lars Jung 2014-05-31 00:28:58 +02:00
parent 25d84fe3df
commit dfa72936f2
3 changed files with 11 additions and 3 deletions

View file

@ -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);
}