rename bugfix

git-svn-id: https://fhem.svn.sourceforge.net/svnroot/fhem/trunk/fhem@2203 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig
2012-11-27 07:47:41 +00:00
parent 10dfc15a4f
commit 25e48d4741
2 changed files with 2 additions and 0 deletions

View File

@@ -24,6 +24,7 @@
loading automatically. A restart is required now! (M. Fischer) loading automatically. A restart is required now! (M. Fischer)
- feature: 98_update.pm saves the statefile before an update (M. Fischer) - feature: 98_update.pm saves the statefile before an update (M. Fischer)
- feature: FHEMWEB longpoll reconnect (Matthias) - feature: FHEMWEB longpoll reconnect (Matthias)
- bugfix: rename may overwrite other devices
- 2012-10-28 (5.3) - 2012-10-28 (5.3)
- feature: added functions trim, ltrim, rtrim, UntoggleDirect, - feature: added functions trim, ltrim, rtrim, UntoggleDirect,

View File

@@ -1548,6 +1548,7 @@ CommandRename($$)
$old = "''" if(!defined($old)); $old = "''" if(!defined($old));
return "Please define $old first" if(!defined($defs{$old})); return "Please define $old first" if(!defined($defs{$old}));
return "$new already defined" if(defined($defs{$new}));
return "Invalid characters in name (not A-Za-z0-9.:_): $new" return "Invalid characters in name (not A-Za-z0-9.:_): $new"
if($new !~ m/^[a-z0-9.:_]*$/i); if($new !~ m/^[a-z0-9.:_]*$/i);
return "Cannot rename global" if($old eq "global"); return "Cannot rename global" if($old eq "global");