X-Git-Url: https://git.p6c8.net/devedit.git/blobdiff_plain/8bc393b21655cb67a6c0bb7ef450b94c366e7aff..aa2bc2bfca200e713a3a831192c992d78d782c47:/modules/Command.pm diff --git a/modules/Command.pm b/modules/Command.pm index edd0162..7119349 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-04-09 +# Last modified: 2005-04-10 # use strict; @@ -181,7 +181,7 @@ sub exec_show($$) $ftpl->parse_if_block('link',-l $phys_path); $ftpl->parse_if_block('no_link',not -l $phys_path); $ftpl->parse_if_block('not_readable',not -r $phys_path); - $ftpl->parse_if_block('binary_file',-B $phys_path); + $ftpl->parse_if_block('binary',-B $phys_path); $ftpl->parse_if_block('readonly',not -w $phys_path); $ftpl->parse_if_block('viewable',(-r $phys_path && -T $phys_path && not $too_large) || -l $phys_path); @@ -336,7 +336,7 @@ sub exec_endedit($$) my $md5sum = $cgi->param('md5sum'); my $output; - if($content && $md5sum) + if(defined $content && $md5sum) { # Normalize newlines @@ -361,7 +361,7 @@ sub exec_endedit($$) local *FILE; sysopen(FILE,$physical,O_RDWR | O_CREAT) or return error($config->{'errors'}->{'edit_failed'},$dir,{FILE => $virtual}); - file_lock(FILE,LOCK_EX) or do { close(FILE); return error($config->{'errors'}->{'edit_failed'},$dir,{FILE => $virtual}) }; + file_lock(*FILE,LOCK_EX) or do { close(FILE); return error($config->{'errors'}->{'edit_failed'},$dir,{FILE => $virtual}) }; binmode(FILE); my $md5 = new Digest::MD5;