X-Git-Url: https://git.p6c8.net/devedit.git/blobdiff_plain/f4d32875ddbbc280b9d6c86ad9472733c5b7d4b5..c1bfe3c380707e7cc6b0582b63f31a77d6f8751a:/modules/Command.pm?ds=sidebyside diff --git a/modules/Command.pm b/modules/Command.pm index bb335dd..e06d0b6 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-20 # use strict; @@ -128,6 +128,8 @@ sub exec_show($$) $udtpl->fillin('UPPER_DIR',$upper_path); $udtpl->fillin('DATE',encode_entities(strftime($config->{'timeformat'},localtime($stat[9])))); + $udtpl->parse_if_block('gmt',$config->{'use_gmt'}); + $dirlist .= $udtpl->get_template; } @@ -147,12 +149,14 @@ 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); $dtpl->parse_if_block('users',$users && -o $phys_path); + $dtpl->parse_if_block('gmt',$config->{'use_gmt'}); + $dirlist .= $dtpl->get_template; } @@ -175,7 +179,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); @@ -190,6 +194,8 @@ sub exec_show($$) $ftpl->parse_if_block('too_large',$config->{'max_file_size'} && $stat[7] > $config->{'max_file_size'}); + $ftpl->parse_if_block('gmt',$config->{'use_gmt'}); + $ftpl->parse_if_block('users',$users && -o $phys_path); $dirlist .= $ftpl->get_template; @@ -912,7 +918,9 @@ 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