2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 12:49:34 +00:00

configDB.pm: minor changes for FUUID

git-svn-id: https://svn.fhem.de/fhem/trunk@18319 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
betateilchen 2019-01-18 18:06:55 +00:00
parent 5966e80026
commit f025c45d4d

View File

@ -143,6 +143,7 @@
# 2018-09-08 - change remove base64 migration functions # 2018-09-08 - change remove base64 migration functions
# #
# 2019-01-17 - added support for device specific uuid (setuuid) # 2019-01-17 - added support for device specific uuid (setuuid)
# 2019-01-18 - changed use GetDefAndAttr()
# #
############################################################################## ##############################################################################
=cut =cut
@ -158,6 +159,7 @@ use MIME::Base64;
# Forward declarations for functions in fhem.pl # Forward declarations for functions in fhem.pl
# #
sub AnalyzeCommandChain($$;$); sub AnalyzeCommandChain($$;$);
sub GetDefAndAttr($;$);
sub Log($$); sub Log($$);
sub Log3($$$); sub Log3($$$);
sub createUniqueId(); sub createUniqueId();
@ -462,28 +464,7 @@ sub cfgDB_SaveCfg(;$) {
next; next;
} }
if($d ne "global") { push (@rowList, GetDefAndAttr($d,1));
my $def = $defs{$d}{DEF};
if(defined($def)) {
$def =~ s/;/;;/g;
$def =~ s/\n/\\\n/g;
} else {
$def = "";
}
push @rowList, "define $d $defs{$d}{TYPE} $def";
push @rowList, "setuuid $d $defs{$d}{FUUID}" if (defined($defs{$d}{FUUID}) && $defs{$d}{FUUID});
}
foreach my $a (sort {
return -1 if($a eq "userattr"); # userattr must be first
return 1 if($b eq "userattr");
return $a cmp $b;
} keys %{$attr{$d}}) {
next if (grep { $_ eq "$d:$a" } @dontSave);
my $val = $attr{$d}{$a};
$val =~ s/;/;;/g;
push @rowList, "attr $d $a $val";
}
} }