Implemented a more encompassing hidden-files ignore rule. Therefore, removed dotted (hidden) files form ignored array.

This commit is contained in:
Alex Russell 2013-09-09 18:13:08 +02:00
bovenliggende f540c54482
commit 18d7bcf83d

Bestand weergeven

@ -223,7 +223,7 @@ function get_ignored() {
// TODO: Add support for wildcards // TODO: Add support for wildcards
// TODO: Add support for specific paths, i.e. /Publish/Somefile.md vs. /Don't_Publish/Somefile.md // TODO: Add support for specific paths, i.e. /Publish/Somefile.md vs. /Don't_Publish/Somefile.md
$options = get_options(); $options = get_options();
$default_ignored_files = array('config.json', 'cgi-bin', '.', '..', '.DS_Store', 'Thumbs.db', '.Trashes', '.htaccess'); $default_ignored_files = array('config.json', 'cgi-bin', 'Thumbs.db');
$default_ignored_folders = array(); // To allow for easy addition of default folders if found necessary in the future $default_ignored_folders = array(); // To allow for easy addition of default folders if found necessary in the future
$user_ignored_files = array(); $user_ignored_files = array();
$user_ignored_folders = array(); $user_ignored_folders = array();
@ -268,7 +268,7 @@ function get_tree($path = '.', $clean_path = '', $title = '', $first = true){
foreach($paths as $file) { foreach($paths as $file) {
// Check that this file or folder is not to be ignored // Check that this file or folder is not to be ignored
if(!in_array($file, $ignore)) { if(!in_array($file, $ignore) && $file[0] !== '.') {
$full_path = "$path/$file"; $full_path = "$path/$file";
$clean_sort = clean_sort($file); $clean_sort = clean_sort($file);