mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-07 22:29:19 +00:00
HMInfo: minor fix
git-svn-id: https://svn.fhem.de/fhem/trunk@20889 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
e01423a294
commit
68f534eee0
@ -205,9 +205,7 @@ sub HMinfo_Notify(@){##########################################################
|
|||||||
HMinfo_archConfig($hash,$name,"","") if(AttrVal($name,"autoArchive",undef));
|
HMinfo_archConfig($hash,$name,"","") if(AttrVal($name,"autoArchive",undef));
|
||||||
}
|
}
|
||||||
if (grep /INITIALIZED/,@{$events}){
|
if (grep /INITIALIZED/,@{$events}){
|
||||||
HMinfo_SetFn($hash,$name,"loadConfig")
|
HMinfo_SetFn($hash,$name,"loadConfig") if ( substr(AttrVal($name, "autoLoadArchive", 0),0,1) ne 0);
|
||||||
if ( grep (/INITIALIZED/,@{$events})
|
|
||||||
&& (substr(AttrVal($name, "autoLoadArchive", 0),0,1) ne 0));
|
|
||||||
|
|
||||||
}
|
}
|
||||||
return undef;
|
return undef;
|
||||||
@ -1938,7 +1936,7 @@ sub HMinfo_loadConfig($@) {####################################################
|
|||||||
my @entryNF = ();
|
my @entryNF = ();
|
||||||
my %changes;
|
my %changes;
|
||||||
my @rUpdate;
|
my @rUpdate;
|
||||||
my @tmplList = (); #collect templates
|
my @tmplList = (); #collect template definitions
|
||||||
while(<rFile>){
|
while(<rFile>){
|
||||||
chomp;
|
chomp;
|
||||||
my $line = $_;
|
my $line = $_;
|
||||||
@ -1965,12 +1963,14 @@ sub HMinfo_loadConfig($@) {####################################################
|
|||||||
if ($eN eq "templateStart"){#if new block we remove all old templates
|
if ($eN eq "templateStart"){#if new block we remove all old templates
|
||||||
@tmplList = ();
|
@tmplList = ();
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
push @tmplList,$line;
|
push @tmplList,$line;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
elsif($cmd1 eq "templateSet"){
|
elsif($cmd1 eq "templateSet"){
|
||||||
my (undef,$eNt,$tpl,$param) = split("=>",$line);
|
my (undef,$eNt,$tpl,$param) = split("=>",$line);
|
||||||
if (defined($defs{$eNt})){
|
if (defined($defs{$eNt})){
|
||||||
if($tpl eq "start"){
|
if($tpl eq "start"){ # no template defined, or deleted - remove it.
|
||||||
delete $defs{$eNt}{helper}{tmpl};
|
delete $defs{$eNt}{helper}{tmpl};
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user