mirror of
https://github.com/DirectoryLister/DirectoryLister.git
synced 2025-09-02 02:12:37 +02:00
Update DirectoryLister.php
This commit is contained in:
@@ -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(
|
||||
|
Reference in New Issue
Block a user