form. It caused a problem with the line endings. Let's hope it does not cause
new problems...
my $output = exec_command($command,\%data,$config);
my $output = exec_command($command,\%data,$config);
- # ... and show the output of the command
+ # ... and show its output
# ... and show the editing form
# ... and show the editing form
- my $content = file_read($physical,1);
+ my $content = file_read($physical);
my $md5sum = md5_hex($$content);
$$content =~ s/\015\012|\012|\015/\n/g;
my $md5sum = md5_hex($$content);
$$content =~ s/\015\012|\012|\015/\n/g;
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}) };
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}) };
my $md5 = new Digest::MD5;
$md5->addfile(*FILE);
my $md5 = new Digest::MD5;
$md5->addfile(*FILE);
return error($config->{'errors'}->{'file_exists'},$virtual,{FILE => $file_virt}) unless($cgi->param('overwrite'));
}
return error($config->{'errors'}->{'file_exists'},$virtual,{FILE => $file_virt}) unless($cgi->param('overwrite'));
}
- my $ascii = $cgi->param('ascii');
- my $handle = $cgi->upload('uploaded_file');
+ my $ascii = $cgi->param('ascii');
+ my $handle = $cgi->upload('uploaded_file');
return error($config->{'errors'}->{'invalid_upload'},$virtual) unless($handle);
return error($config->{'errors'}->{'invalid_upload'},$virtual) unless($handle);
my $dir = upper_path($virtual);
my $new_physical = $data->{'new_physical'};
my $dir = upper_path($virtual);
my $new_physical = $data->{'new_physical'};
- return error($config->{'errors'}->{'rename_root'},'/') if($virtual eq '/');
- return error($config->{'errors'}->{'no_rename'},$dir) unless(-w upper_path($physical));
+ return error($config->{'errors'}->{'rename_root'},'/') if($virtual eq '/');
+ return error($config->{'errors'}->{'no_rename'},$dir) unless(-w upper_path($physical));