mirror of
https://github.com/fhem/fhem-mirror.git
synced 2024-11-22 09:49:50 +00:00
configDB: support for device specific userattr
git-svn-id: https://svn.fhem.de/fhem/trunk@6636 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
b8ec728793
commit
a8706c2206
@ -85,6 +85,8 @@
|
||||
#
|
||||
# 2014-08-22 - added automatic fileimport during migration
|
||||
#
|
||||
# 2014-09-30 - added support for device based userattr
|
||||
#
|
||||
##############################################################################
|
||||
#
|
||||
|
||||
@ -363,13 +365,26 @@ sub cfgDB_SaveCfg() {
|
||||
push @rowList, "define $d $defs{$d}{TYPE} $def";
|
||||
}
|
||||
|
||||
foreach my $a (sort keys %{$attr{$d}}) {
|
||||
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($d eq "global" &&
|
||||
($a eq "configfile" || $a eq "version"));
|
||||
my $val = $attr{$d}{$a};
|
||||
$val =~ s/;/;;/g;
|
||||
push @rowList, "attr $d $a $val";
|
||||
}
|
||||
|
||||
# foreach my $a (sort keys %{$attr{$d}}) {
|
||||
# next if($d eq "global" &&
|
||||
# ($a eq "configfile" || $a eq "version"));
|
||||
# my $val = $attr{$d}{$a};
|
||||
# $val =~ s/;/;;/g;
|
||||
# push @rowList, "attr $d $a $val";
|
||||
# }
|
||||
|
||||
}
|
||||
|
||||
foreach my $a (sort keys %{$attr{configdb}}) {
|
||||
|
Loading…
Reference in New Issue
Block a user