mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
fixed a bug in update.pm
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@2580 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
9766b11e58
commit
bbcec43f28
@ -58,19 +58,6 @@ CommandUpdate($$)
|
|||||||
my $force = 0;
|
my $force = 0;
|
||||||
my $ret = "";
|
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
|
# split arguments
|
||||||
my @args = split(/ +/,$param);
|
my @args = split(/ +/,$param);
|
||||||
|
|
||||||
@ -103,6 +90,19 @@ CommandUpdate($$)
|
|||||||
return $ret;
|
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
|
# check arguments
|
||||||
if (defined($args[1]) && $args[1] eq "?" ||
|
if (defined($args[1]) && $args[1] eq "?" ||
|
||||||
(int(@args) > 3 && uc($args[1]) eq "HOUSEKEEPING") ||
|
(int(@args) > 3 && uc($args[1]) eq "HOUSEKEEPING") ||
|
||||||
@ -146,7 +146,7 @@ CommandUpdate($$)
|
|||||||
$ret = update_DoUpdate($srcdir,$BRANCH,$update,$force,$cl);
|
$ret = update_DoUpdate($srcdir,$BRANCH,$update,$force,$cl);
|
||||||
if(lc($sendStatistics) eq "onupdate") {
|
if(lc($sendStatistics) eq "onupdate") {
|
||||||
$ret .= "\n\n";
|
$ret .= "\n\n";
|
||||||
$ret .= CommandFheminfo(undef,"send");
|
$ret .= AnalyzeCommandChain(undef, "fheminfo send");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user