From cc0eecb1168a55eee8692a80738a3694497f5fb1 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@2580 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/98_update.pm | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/fhem/FHEM/98_update.pm b/fhem/FHEM/98_update.pm index 167b8d4d1..0bcc97d00 100644 --- a/fhem/FHEM/98_update.pm +++ b/fhem/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"); } }