2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 18:59:33 +00:00

98_SVG.pm: favor plotReplace against title for <TL> replacement (Forum #82619)

git-svn-id: https://svn.fhem.de/fhem/trunk@15863 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2018-01-12 21:32:18 +00:00
parent a389416b15
commit 5050ba3b7f

View File

@ -879,6 +879,18 @@ SVG_substcfg($$$$$$)
my $gplot_script = join("", @{$cfg});
$gplot_script .= $plot if(!$splitret);
my $plotReplace = AttrVal($wl, "plotReplace", undef);
if($plotReplace) {
my ($list, $pr) = parseParams($plotReplace, "\\s"," ");
for my $k (keys %$pr) {
if($pr->{$k} =~ m/^{.*}$/) {
$cmdFromAnalyze = $pr->{$k};
$pr->{$k} = eval $cmdFromAnalyze;
}
$gplot_script =~ s/<$k>/$pr->{$k}/g;
}
}
$gplot_script =~ s/<OUT>/$tmpfile/g;
$gplot_script =~ s/<IN>/$file/g;
@ -895,18 +907,6 @@ SVG_substcfg($$$$$$)
}
}
my $plotReplace = AttrVal($wl, "plotReplace", undef);
if($plotReplace) {
my ($list, $pr) = parseParams($plotReplace, "\\s"," ");
for my $k (keys %$pr) {
if($pr->{$k} =~ m/^{.*}$/) {
$cmdFromAnalyze = $pr->{$k};
$pr->{$k} = eval $cmdFromAnalyze;
}
$gplot_script =~ s/<$k>/$pr->{$k}/g;
}
}
$plot =~ s/\r//g; # For our windows friends...
$gplot_script =~ s/\r//g;