]> git.p6c8.net - devedit.git/blobdiff - modules/Command.pm
Merged changes of revision 1.76 of modules/Command.pm and revision 1.33 of
[devedit.git] / modules / Command.pm
index e6491e7c9bc0db3f020c9d6dc5e660c11ef87e2b..b9467a553b67c440446a8eb05cd10865f61fbdb8 100644 (file)
@@ -6,7 +6,7 @@ package Command;
 # Execute Dev-Editor's commands
 #
 # Author:        Patrick Canterino <patrick@patshaping.de>
-# Last modified: 2005-02-14
+# Last modified: 2005-04-22
 #
 
 use strict;
@@ -103,7 +103,7 @@ sub exec_show($$)
   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'};
@@ -207,6 +207,7 @@ sub exec_show($$)
   $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'});
@@ -680,7 +681,7 @@ sub exec_rename($$)
    }
   }
 
-  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

patrick-canterino.de