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

configDB.pm: fix exclusion list for attributes in save

git-svn-id: https://svn.fhem.de/fhem/trunk@22992 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
betateilchen 2020-10-20 07:43:36 +00:00
parent bb1cf73c0c
commit 4f981c65b0

View File

@ -452,6 +452,7 @@ sub cfgDB_SaveCfg { ## prototype used in fhem.pl
my ($internal) = shift; my ($internal) = shift;
$internal = defined($internal) ? $internal : 0; $internal = defined($internal) ? $internal : 0;
my $c = "configdb";
my @dontSave = qw(configdb:rescue configdb:nostate configdb:loadversion my @dontSave = qw(configdb:rescue configdb:nostate configdb:loadversion
global:configfile global:version); global:configfile global:version);
my (%devByNr, @rowList, %comments, $t, $out); my (%devByNr, @rowList, %comments, $t, $out);
@ -483,8 +484,9 @@ sub cfgDB_SaveCfg { ## prototype used in fhem.pl
foreach my $a (sort keys %{$configDB{attr}}) { foreach my $a (sort keys %{$configDB{attr}}) {
my $val = $configDB{attr}{$a}; my $val = $configDB{attr}{$a};
next unless $val; next unless $val;
next if grep {$_ eq "$c:$a";} @dontSave;
$val =~ s/;/;;/g; $val =~ s/;/;;/g;
push @rowList, "attr configdb $a $val"; push @rowList, "attr $c $a $val";
} }
# Insert @rowList into database table # Insert @rowList into database table