mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-29 23:47:10 +00:00
98_DOIF.pm: fixed: safe comma
git-svn-id: https://svn.fhem.de/fhem/trunk@10899 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
d1696554e0
commit
3400385f42
@ -111,7 +111,7 @@ GetBlockDoIf ($$)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
sub
|
sub
|
||||||
GetCommand ($)
|
GetCommandDoIf ($)
|
||||||
{
|
{
|
||||||
my ($tailBlock) = @_;
|
my ($tailBlock) = @_;
|
||||||
my $char;
|
my $char;
|
||||||
@ -138,6 +138,8 @@ GetCommand ($)
|
|||||||
}
|
}
|
||||||
if ($cmd eq "") {
|
if ($cmd eq "") {
|
||||||
$cmd=$tailBlock;
|
$cmd=$tailBlock;
|
||||||
|
} else {
|
||||||
|
$cmd=$cmd.$tailBlock
|
||||||
}
|
}
|
||||||
return ($cmd,"");
|
return ($cmd,"");
|
||||||
}
|
}
|
||||||
@ -541,7 +543,7 @@ ParseCommandsDoIf($$$)
|
|||||||
return ($currentBlock,$err) if ($err);
|
return ($currentBlock,$err) if ($err);
|
||||||
#$tailBlock=substr($tailBlock,pos($tailBlock)) if ($tailBlock =~ /^\s*,/g);
|
#$tailBlock=substr($tailBlock,pos($tailBlock)) if ($tailBlock =~ /^\s*,/g);
|
||||||
} else {
|
} else {
|
||||||
($currentBlock,$tailBlock)=GetCommand($tailBlock);
|
($currentBlock,$tailBlock)=GetCommandDoIf($tailBlock);
|
||||||
}
|
}
|
||||||
if ($currentBlock ne "") {
|
if ($currentBlock ne "") {
|
||||||
($currentBlock,$err)=ReplaceAllReadingsDoIf($hash,$currentBlock,-1,$eval);
|
($currentBlock,$err)=ReplaceAllReadingsDoIf($hash,$currentBlock,-1,$eval);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user