X-Git-Url: https://git.p6c8.net/devedit.git/blobdiff_plain/548d69a4ee38cc59612e787f479ac198d5c37741..7897c609d415e2362b8c42c3b918a7ebcb5c4bda:/modules/Command.pm?ds=sidebyside diff --git a/modules/Command.pm b/modules/Command.pm index bb335dd..8ffc765 100644 --- a/modules/Command.pm +++ b/modules/Command.pm @@ -6,7 +6,7 @@ package Command; # Execute Dev-Editor's commands # # Author: Patrick Canterino -# Last modified: 2005-01-06 +# Last modified: 2005-01-24 # use strict; @@ -126,7 +126,7 @@ sub exec_show($$) $udtpl->read_file($config->{'templates'}->{'dirlist_up'}); $udtpl->fillin('UPPER_DIR',$upper_path); - $udtpl->fillin('DATE',encode_entities(strftime($config->{'timeformat'},localtime($stat[9])))); + $udtpl->fillin('DATE',encode_entities(strftime($config->{'timeformat'},($config->{'use_gmt'}) ? gmtime($stat[9]) : localtime($stat[9])))); $dirlist .= $udtpl->get_template; } @@ -147,7 +147,7 @@ sub exec_show($$) $dtpl->fillin('DIR',$virt_path); $dtpl->fillin('DIR_NAME',encode_entities($dir)); - $dtpl->fillin('DATE',encode_entities(strftime($config->{'timeformat'},localtime($stat[9])))); + $dtpl->fillin('DATE',encode_entities(strftime($config->{'timeformat'},($config->{'use_gmt'}) ? gmtime($stat[9]) : localtime($stat[9])))); $dtpl->fillin('URL',equal_url(encode_entities($config->{'httproot'}),$virt_path)); $dtpl->parse_if_block('readable',-r $phys_path && -x $phys_path); @@ -175,7 +175,7 @@ sub exec_show($$) $ftpl->fillin('FILE',$virt_path); $ftpl->fillin('FILE_NAME',encode_entities($file)); $ftpl->fillin('SIZE',$stat[7]); - $ftpl->fillin('DATE',encode_entities(strftime($config->{'timeformat'},localtime($stat[9])))); + $ftpl->fillin('DATE',encode_entities(strftime($config->{'timeformat'},($config->{'use_gmt'}) ? gmtime($stat[9]) : localtime($stat[9])))); $ftpl->fillin('URL',equal_url(encode_entities($config->{'httproot'}),$virt_path)); $ftpl->parse_if_block('not_readable',not -r $phys_path); @@ -207,6 +207,7 @@ sub exec_show($$) $tpl->parse_if_block('dir_writeable',$dir_writeable); $tpl->parse_if_block('filter',$filter2); + $tpl->parse_if_block('gmt',$config->{'use_gmt'}); } else { @@ -373,7 +374,7 @@ sub exec_endedit($$) if(file_save($physical,\$content)) { - # Saving of the file was successful! + # The file was successfully saved! return devedit_reload({command => 'show', file => $dir}); } @@ -463,7 +464,7 @@ sub exec_mkdir($$) # exec_upload() # -# Upload a file +# Process a file upload # # Params: 1. Reference to user input hash # 2. Reference to config hash @@ -912,13 +913,16 @@ sub exec_about($$) $tpl->fillin('HTTPD',encode_entities($ENV{'SERVER_SOFTWARE'})); $tpl->fillin('OS', encode_entities($^O)); - $tpl->fillin('TIME', encode_entities(strftime($config->{'timeformat'},localtime))); + $tpl->fillin('TIME', encode_entities(strftime($config->{'timeformat'},($config->{'use_gmt'}) ? gmtime : localtime))); + + $tpl->parse_if_block('gmt',$config->{'use_gmt'}); # Process information $tpl->fillin('PID',$$); - # Check if the functions getpwuid() and getgrgid() are available + # The following information is only available on systems supporting + # users and groups if($users) {