Skip to content

Commit

Permalink
Update DirectoryLister.php
Browse files Browse the repository at this point in the history
  • Loading branch information
OzanKurt committed Apr 22, 2016
1 parent d341687 commit c459bb8
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion resources/DirectoryLister.php
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,19 @@ public function getThemeName() {
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
Expand Down Expand Up @@ -619,6 +631,12 @@ protected function _readDirectory($directory, $sort = 'natcase') {
} 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(
Expand Down

0 comments on commit c459bb8

Please sign in to comment.