From a35001a77f9035eda909de815c1dfef1cbfd1dc8 Mon Sep 17 00:00:00 2001
From: markusbloch <>
Date: Sun, 13 Mar 2016 16:41:00 +0000
Subject: [PATCH] FB_CALLLIST: don't create html code in readings when
create-readings attribute is activated and number-cmd attribute is set.
git-svn-id: https://svn.fhem.de/fhem/trunk@11055 2b470e98-0d58-463d-a4d8-8e2adae1ed80
---
fhem/FHEM/72_FB_CALLLIST.pm | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/fhem/FHEM/72_FB_CALLLIST.pm b/fhem/FHEM/72_FB_CALLLIST.pm
index 18ce23ccc..910305924 100755
--- a/fhem/FHEM/72_FB_CALLLIST.pm
+++ b/fhem/FHEM/72_FB_CALLLIST.pm
@@ -769,13 +769,6 @@ sub FB_CALLLIST_list2html($;$)
my $number = $data->{external_number};
- if(defined(my $cmd = AttrVal($name, "number-cmd", undef)))
- {
- $cmd =~ s/\$NUMBER/$number/g;
-
- $number = ''.$number."";
- }
-
$line = {
index => $index,
line => $count,
@@ -790,8 +783,17 @@ sub FB_CALLLIST_list2html($;$)
duration => FB_CALLLIST_formatDuration($hash, $index)
};
- push @json_output, FB_CALLLIST_returnOrderedJSONOutput($hash, $line);
FB_CALLLIST_updateReadings($hash, $line) if($to_json and $create_readings eq "1");
+
+ if(defined(my $cmd = AttrVal($name, "number-cmd", undef)))
+ {
+ $cmd =~ s/\$NUMBER/$number/g;
+
+ $line->{number} = ''.$number."";
+ }
+
+ push @json_output, FB_CALLLIST_returnOrderedJSONOutput($hash, $line);
+
$ret .= FB_CALLLIST_returnOrderedHTMLOutput($hash, $line, 'number="'.$count.'" class="fbcalllist '.($count % 2 == 1 ? "odd" : "even").'"', 'class="fbcalllist" '.$td_style);
}