# Execute Dev-Editor's commands
#
# Author: Patrick Canterino <patrick@patshaping.de>
-# Last modified: 2005-02-12
+# Last modified: 2005-04-22
#
use strict;
return error($config->{'errors'}->{'no_dir_access'},$upper_path) unless(-r $physical && -x $physical);
my $direntries = dir_read($physical);
- return error($config->{'dir_read_fail'},$upper_path,{DIR => encode_entities($virtual)}) unless($direntries);
+ return error($config->{'errors'}->{'dir_read_fail'},$upper_path,{DIR => encode_entities($virtual)}) unless($direntries);
my $files = $direntries->{'files'};
my $dirs = $direntries->{'dirs'};
$tpl->fillin('FILTER',encode_entities($filter2));
$tpl->fillin('FILTER_URL',escape($filter2));
+ $tpl->parse_if_block('empty',$dirlist eq '');
$tpl->parse_if_block('dir_writeable',$dir_writeable);
$tpl->parse_if_block('filter',$filter2);
$tpl->parse_if_block('gmt',$config->{'use_gmt'});
return error($config->{'errors'}->{'link_edit'},$dir) if(-l $physical);
return error($config->{'errors'}->{'dir_edit'},$dir) if(-d $physical);
return error($config->{'errors'}->{'no_edit'},$dir) if(-e $physical && !(-r $physical && -w $physical));
- return error($config->{'errors'}->{'text_to_binary'},$dir) unless(-T $physical);
+ return error($config->{'errors'}->{'text_to_binary'},$dir) if(-e $physical && not -T $physical);
if(file_save($physical,\$content))
{
}
}
- rename($physical,$new_physical) or return error($config->{'errors'}->{'rename_failed'},$dir,{FILE => $virtual, NEW_FILE => $new_virtual});
+ move($physical,$new_physical) or return error($config->{'errors'}->{'rename_failed'},$dir,{FILE => $virtual, NEW_FILE => $new_virtual});
return devedit_reload({command => 'show', file => $new_dir});
}
else