2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-24 09:09:19 +00:00

98_configdb.pm: improve attribute handling

git-svn-id: https://svn.fhem.de/fhem/trunk@15757 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
betateilchen 2018-01-02 19:23:52 +00:00
parent 374d330d7b
commit 2ba75318d7

View File

@ -49,7 +49,7 @@ sub CommandConfigdb($$) {
}
} elsif($param2 eq "") {
# delete attribute
undef($configDB{attr}{$param1});
delete $configDB{attr}{$param1};
$ret = " attribute $param1 deleted";
} else {
# set attribute
@ -218,8 +218,10 @@ sub CommandConfigdb($$) {
}
when ('list') {
$param1 = $param1 ? $param1 : '%';
$param2 = $param2 ? $param2 : 0;
$param1 //= '%';
$param2 //= 0;
$ret = "list not allowed for configDB itself.";
break if($param1 =~ m/configdb/i);
Log3('configdb', 4, "configdb: list requested for device: $param1 in version $param2.");
$ret = _cfgDB_Search($param1,$param2,1);
}