93_DbLog: contrib 3.12.0

git-svn-id: https://svn.fhem.de/fhem/trunk@17321 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
DS_Starter
2018-09-10 19:42:04 +00:00
parent 6ec88b44eb
commit 90a4a4bf52

View File

@@ -513,10 +513,12 @@ sub DbLog_Set($@) {
my $ret;
if ($a[1] eq 'reduceLog') {
my ($od,$nd) = split(":",$a[2]); # $od - Tage älter als , $nd - Tage neuer als
if ($nd && $nd <= $od) {return "The second day value must be greater than the first one ! ";}
if (defined($a[3]) && $a[3] !~ /^average$|^average=.+|^EXCLUDE=.+$|^INCLUDE=.+$/i) {
return "ReduceLog syntax error in set command. Please see commandref for help.";
}
if (defined $a[2] && $a[2] =~ /^\d+$/) {
if (defined $a[2] && $a[2] =~ /(^\d+$)|(^\d+:\d+$)/) {
$ret = DbLog_reduceLog($hash,@a);
InternalTimer(gettimeofday()+5, "DbLog_execmemcache", $hash, 0);
} else {
@@ -525,6 +527,8 @@ sub DbLog_Set($@) {
}
}
elsif ($a[1] eq 'reduceLogNbl') {
my ($od,$nd) = split(":",$a[2]); # $od - Tage älter als , $nd - Tage neuer als
if ($nd && $nd <= $od) {return "The second day value must be greater than the first one ! ";}
if (defined($a[3]) && $a[3] !~ /^average$|^average=.+|^EXCLUDE=.+$|^INCLUDE=.+$/i) {
return "ReduceLogNbl syntax error in set command. Please see commandref for help.";
}