mirror of
https://github.com/DirectoryLister/DirectoryLister.git
synced 2025-09-02 18:33:04 +02:00
Resolved merge conflict in default.config.php
This commit is contained in:
@@ -290,7 +290,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
|
||||
@@ -612,6 +624,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(
|
||||
|
@@ -9,6 +9,7 @@ return array(
|
||||
'list_sort_order' => 'natcasesort',
|
||||
'theme_name' => 'bootstrap',
|
||||
'external_links_new_window' => true,
|
||||
'links_for_dirs_with_index' => false,
|
||||
'date_format' => 'Y-m-d H:i:s', // See: http://php.net/manual/en/function.date.php
|
||||
|
||||
// Hidden files
|
||||
|
@@ -124,11 +124,15 @@
|
||||
|
||||
<?php else: ?>
|
||||
|
||||
<?php if ($lister->containsIndex($fileInfo['file_path'])): ?>
|
||||
<?php if (!$lister->linksForDirsWithIndex()): ?>
|
||||
|
||||
<a href="<?php echo $fileInfo['file_path']; ?>" class="web-link-button" <?php if($lister->externalLinksNewWindow()): ?>target="_blank"<?php endif; ?>>
|
||||
<i class="fa fa-external-link"></i>
|
||||
</a>
|
||||
<?php if ($lister->containsIndex($fileInfo['file_path'])): ?>
|
||||
|
||||
<a href="<?php echo $fileInfo['file_path']; ?>" class="web-link-button" <?php if($lister->externalLinksNewWindow()): ?>target="_blank"<?php endif; ?>>
|
||||
<i class="fa fa-external-link"></i>
|
||||
</a>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
|
Reference in New Issue
Block a user