From bbcec43f280a379f00b5c1323fcdf8b13a168593 Mon Sep 17 00:00:00 2001 From: mfr69bs <> Date: Sun, 27 Jan 2013 18:02:37 +0000 Subject: [PATCH] fixed a bug in update.pm git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@2580 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- FHEM/98_update.pm | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/FHEM/98_update.pm b/FHEM/98_update.pm index 167b8d4d1..0bcc97d00 100644 --- a/FHEM/98_update.pm +++ b/FHEM/98_update.pm @@ -58,19 +58,6 @@ CommandUpdate($$) my $force = 0; my $ret = ""; - # check for fheminfo settings - my $sendStatistics = AttrVal("global","sendStatistics",undef); - if(!defined($sendStatistics) || - ( defined($sendStatistics) && - lc($sendStatistics) ne "onupdate" || - lc($sendStatistics) ne "manually" || - lc($sendStatistics) ne "never" ) - ) { - $ret = optInFhemInfo(); - Log 1,"update Action required: please run 'update viewAdvice'"; - return $ret; - } - # split arguments my @args = split(/ +/,$param); @@ -103,6 +90,19 @@ CommandUpdate($$) return $ret; } + # check for fheminfo settings + my $sendStatistics = AttrVal("global","sendStatistics",undef); + if(!defined($sendStatistics) || + ( defined($sendStatistics) && + lc($sendStatistics) ne "onupdate" && + lc($sendStatistics) ne "manually" && + lc($sendStatistics) ne "never" ) + ) { + $ret = optInFhemInfo(); + Log 1,"update Action required: please run 'update viewAdvice'"; + return $ret; + } + # check arguments if (defined($args[1]) && $args[1] eq "?" || (int(@args) > 3 && uc($args[1]) eq "HOUSEKEEPING") || @@ -146,7 +146,7 @@ CommandUpdate($$) $ret = update_DoUpdate($srcdir,$BRANCH,$update,$force,$cl); if(lc($sendStatistics) eq "onupdate") { $ret .= "\n\n"; - $ret .= CommandFheminfo(undef,"send"); + $ret .= AnalyzeCommandChain(undef, "fheminfo send"); } }