mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-16 04:36:02 +00:00
fhem.pl: devspec2array compatibility fix
FHEMWEB: plotfork fix git-svn-id: https://svn.fhem.de/fhem/trunk@4343 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
00b1bcbf96
commit
96c22c141d
@ -351,7 +351,7 @@ FW_Read($)
|
||||
my $pid;
|
||||
if(AttrVal($FW_wname, "plotfork", undef)) {
|
||||
# Process SVG rendering as a parallel process
|
||||
return if(($arg =~ m/cmd=showlog/) && ($pid = fork));
|
||||
return if(($arg =~ m+$FW_ME/SVG_showLog+) && ($pid = fork));
|
||||
}
|
||||
|
||||
my $cacheable = FW_answerCall($arg);
|
||||
|
11
fhem/fhem.pl
11
fhem/fhem.pl
@ -871,13 +871,16 @@ devspec2array($)
|
||||
return $name;
|
||||
}
|
||||
|
||||
my @ret;
|
||||
my (@ret, $isAttr);
|
||||
foreach my $l (split(",", $name)) { # List of elements
|
||||
my @names = sort keys %defs;
|
||||
my @res;
|
||||
foreach my $dName (split(":FILTER=", $name)) {
|
||||
my ($n,$op,$re) = ("NAME","=",$dName);
|
||||
($n,$op,$re) = ($1,$2,$3) if($dName =~ m/^([^!]*)(=|!=)(.*)$/);
|
||||
my ($n,$op,$re) = ("DEVICE","=",$dName);
|
||||
if($dName =~ m/^([^!]*)(=|!=)(.*)$/) {
|
||||
($n,$op,$re) = ($1,$2,$3);
|
||||
$isAttr = 1; # Compatibility: return "" instead of $name
|
||||
}
|
||||
($n,$op,$re) = ($1,"eval","") if($dName =~ m/^{(.*)}$/);
|
||||
|
||||
@res=();
|
||||
@ -915,7 +918,7 @@ devspec2array($)
|
||||
}
|
||||
push @ret,@res;
|
||||
}
|
||||
return $name if(!@ret);
|
||||
return $name if(!@ret && !$isAttr);
|
||||
return @ret;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user