From 40f2eee5acdbe92aca68f47ffc6ee15aa3035f7e Mon Sep 17 00:00:00 2001 From: pcanterino <> Date: Mon, 30 Mar 2009 17:58:58 +0000 Subject: [PATCH 1/1] Added new configurtaion option for hiding dot files. When new option "hide_dot_files" is set to 1, every file or directory beginning with a "." is not shown in the directory listing. But you can still access the file / directory by typing its name into the "Go to directory/file" box. This option is also available in the user-dependent configuration. --- devedit.conf | 16 +++++++++------- modules/Command.pm | 2 ++ modules/Config/DevEdit.pm | 10 ++++++---- 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/devedit.conf b/devedit.conf index 0da399c..ffe3ca2 100644 --- a/devedit.conf +++ b/devedit.conf @@ -3,15 +3,17 @@ # # Please don't use quotation marks around the keys and values! -fileroot = D:/WWW/dokumente/devedit-test -httproot = /devedit-test/ +fileroot = D:/WWW/dokumente/devedit-test +httproot = /devedit-test/ -max_file_size = 100000 +max_file_size = 100000 -timeformat = %d.%m.%Y %H:%M -use_gmt = 0 +timeformat = %d.%m.%Y %H:%M +use_gmt = 0 -error_file = errors.conf -template_file = templates.conf +hide_dot_files = 0 + +error_file = errors.conf +template_file = templates.conf # End of configuration file \ No newline at end of file diff --git a/modules/Command.pm b/modules/Command.pm index 2905545..a35abd4 100644 --- a/modules/Command.pm +++ b/modules/Command.pm @@ -132,6 +132,7 @@ sub exec_show($$) foreach my $dir(@$dirs) { + next if($config->{'hide_dot_files'} && substr($dir,0,1) eq '.'); next unless(dos_wildcard_match($filter1,$dir)); my $phys_path = $physical.'/'.$dir; @@ -159,6 +160,7 @@ sub exec_show($$) foreach my $file(@$files) { + next if($config->{'hide_dot_files'} && substr($file,0,1) eq '.'); next unless(dos_wildcard_match($filter1,$file)); my $phys_path = $physical.'/'.$file; diff --git a/modules/Config/DevEdit.pm b/modules/Config/DevEdit.pm index bc93cfe..8d9d503 100644 --- a/modules/Config/DevEdit.pm +++ b/modules/Config/DevEdit.pm @@ -66,12 +66,14 @@ sub read_config($) my $new_conf = $userconf->{$ENV{'REMOTE_USER'}}; - $config->{'fileroot'} = $new_conf->{'fileroot'} if($new_conf->{'fileroot'}); - $config->{'httproot'} = $new_conf->{'httproot'} if($new_conf->{'httproot'}); + $config->{'fileroot'} = $new_conf->{'fileroot'} if($new_conf->{'fileroot'}); + $config->{'httproot'} = $new_conf->{'httproot'} if($new_conf->{'httproot'}); - $config->{'forbidden'} = $new_conf->{'forbidden'} if(defined $new_conf->{'forbidden'}); + $config->{'forbidden'} = $new_conf->{'forbidden'} if(defined $new_conf->{'forbidden'}); - $config->{'user_config'} = 1; + $config->{'hide_dot_files'} = $new_conf->{'hide_dot_files'} if(defined $new_conf->{'hide_dot_files'}); + + $config->{'user_config'} = 1; } } -- 2.34.1