From 31d7fd6867fd1fc8717a4faab0dfd180ec311043 Mon Sep 17 00:00:00 2001 From: Faber Vergara Date: Wed, 22 Apr 2015 12:19:55 -0500 Subject: [PATCH] Add open links in another window option --- resources/DirectoryLister.php | 11 +++++++++++ resources/default.config.php | 1 + resources/themes/bootstrap/index.php | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/resources/DirectoryLister.php b/resources/DirectoryLister.php index 841fd8e..353f0e9 100644 --- a/resources/DirectoryLister.php +++ b/resources/DirectoryLister.php @@ -202,6 +202,17 @@ class DirectoryLister { } + /** + * Returns open links in another window + * + * @return boolean Returns true if in config is enabled open links in another window, false if not + * @access public + */ + public function determineOpenLinksAnotherWindow() { + return $this->_config['open_links_another_window']; + } + + /** * Returns the path to the chosen theme directory * diff --git a/resources/default.config.php b/resources/default.config.php index d0287c3..dfb6618 100644 --- a/resources/default.config.php +++ b/resources/default.config.php @@ -7,6 +7,7 @@ return array( 'list_folders_first' => true, 'list_sort_order' => 'natcasesort', 'theme_name' => 'bootstrap', + 'open_links_another_window' => true, // Hidden files 'hidden_files' => array( diff --git a/resources/themes/bootstrap/index.php b/resources/themes/bootstrap/index.php index fd00d23..418f250 100644 --- a/resources/themes/bootstrap/index.php +++ b/resources/themes/bootstrap/index.php @@ -110,7 +110,7 @@ containsIndex($fileInfo['file_path'])): ?> - + determineOpenLinksAnotherWindow()) echo 'target="_blank"'?> >