Skip to content

Commit

Permalink
Add the ability to change date format in config. Implements Directory…
Browse files Browse the repository at this point in the history
  • Loading branch information
marcinlawnik committed Jul 26, 2016
1 parent d341687 commit 5b8d2f2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions resources/DirectoryLister.php
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ protected function _readDirectory($directory, $sort = 'natcase') {
'file_path' => $this->_appURL . $directoryPath,
'url_path' => $this->_appURL . $directoryPath,
'file_size' => '-',
'mod_time' => date('Y-m-d H:i:s', filemtime($realPath)),
'mod_time' => date($this->_config['date_display'], filemtime($realPath)),
'icon_class' => 'fa-level-up',
'sort' => 0
);
Expand All @@ -625,7 +625,7 @@ protected function _readDirectory($directory, $sort = 'natcase') {
'file_path' => $relativePath,
'url_path' => $urlPath,
'file_size' => is_dir($realPath) ? '-' : $this->getFileSize($realPath),
'mod_time' => date('Y-m-d H:i:s', filemtime($realPath)),
'mod_time' => date($this->_config['date_display'], filemtime($realPath)),
'icon_class' => $iconClass,
'sort' => $sort
);
Expand Down
2 changes: 2 additions & 0 deletions resources/default.config.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
'list_sort_order' => 'natcasesort',
'theme_name' => 'bootstrap',
'external_links_new_window' => true,
// Format of date display, see: http://php.net/manual/en/function.date.php
'date_display' => 'Y-m-d H:i:s',

// Hidden files
'hidden_files' => array(
Expand Down

0 comments on commit 5b8d2f2

Please sign in to comment.