98_DSBMobile.pm: Fixed encoding

git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@21608 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
KernSani 2020-04-05 19:42:53 +00:00
parent 1809ebbfd0
commit 635d2f7860

View File

@ -1,4 +1,4 @@
# $Id$ # $Id$
############################################################################## ##############################################################################
# #
# 98_DSBMobile.pm # 98_DSBMobile.pm
@ -255,12 +255,18 @@ sub DSBMobile_getDataCallback($) {
my $d = $topic->{Root}{Childs}; my $d = $topic->{Root}{Childs};
for my $tile (@$d) { for my $tile (@$d) {
my %au = ( my $subtile = $tile->{Childs};
title => $tile->{Title}, my $i = 1;
url => $tile->{Childs}[0]->{Detail}, for my $stile (@$subtile) {
date => $tile->{Childs}[0]->{Date} my %au = (
); title => $tile->{Title}.$i,
push( @aus, \%au ); url => $stile->{Detail},
date => $stile->{Date}
);
$i++;
push( @aus, \%au );
}
} }
} }
} }
@ -625,7 +631,7 @@ sub DSBMobile_simpleHTML($;$) {
@days = sort { $a cmp $b } @days; @days = sort { $a cmp $b } @days;
my $date = ""; my $date = "";
my $class;
my $out = AttrVal( $name, "dsb_outputFormat", undef ); my $out = AttrVal( $name, "dsb_outputFormat", undef );
foreach my $day (@days) { foreach my $day (@days) {
@ -635,15 +641,15 @@ sub DSBMobile_simpleHTML($;$) {
$row++; $row++;
if ($infoDay) { if ($infoDay) {
foreach my $iline (@idata) { foreach my $iline (@idata) {
if ( $row % 2 == 0 ) {
$class = "even";
}
else {
$class = "odd";
}
$row++;
if ( $iline->{sdate} eq $day ) { if ( $iline->{sdate} eq $day ) {
if ( $row % 2 == 0 ) {
$class = "even";
}
else {
$class = "odd";
}
$row++;
$ret .= "<tr class='$class'><td>" . $iline->{topic} . ": " . $iline->{text} . "</td></tr>"; $ret .= "<tr class='$class'><td>" . $iline->{topic} . ": " . $iline->{text} . "</td></tr>";
} }
} }