Update DirectoryLister.php

This commit is contained in:
Ozan Kurt
2016-04-22 16:00:14 +03:00
parent d341687193
commit c459bb8298

View File

@@ -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(