diff --git a/resources/DirectoryLister.php b/resources/DirectoryLister.php index c038008..df1f64e 100644 --- a/resources/DirectoryLister.php +++ b/resources/DirectoryLister.php @@ -297,7 +297,19 @@ class DirectoryLister { public function externalLinksNewWindow() { return $this->_config['external_links_new_window']; } - + + + /** + * Returns use real url for indexed directories + * + * @return boolean Returns true if in config is enabled links for directories with index, false if not + * @access public + */ + public function linksForDirsWithIndex() + { + return $this->_config['links_for_dirs_with_index']; + } + /** * Returns the path to the chosen theme directory @@ -619,6 +631,12 @@ class DirectoryLister { } else { $urlPath = $urlPath; } + + if ($this->linksForDirsWithIndex()) { + if ($this->containsIndex($relativePath)) { + $urlPath = $relativePath; + } + } // Add the info to the main array $directoryArray[pathinfo($relativePath, PATHINFO_BASENAME)] = array(