mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
33_readingsGroup.pm: safeguard due to uninitialized $FW_ME
git-svn-id: https://svn.fhem.de/fhem/trunk@11573 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
cd158c943a
commit
f11dda9525
@ -396,10 +396,10 @@ readingsGroup_makeLink($$$)
|
|||||||
if( AttrVal($FW_wname, "longpoll", 1)) {
|
if( AttrVal($FW_wname, "longpoll", 1)) {
|
||||||
$txt = "<a style=\"cursor:pointer\" onClick=\"FW_cmd('$FW_ME$FW_subdir?XHR=1&$link')\">$txt</a>";
|
$txt = "<a style=\"cursor:pointer\" onClick=\"FW_cmd('$FW_ME$FW_subdir?XHR=1&$link')\">$txt</a>";
|
||||||
} else {
|
} else {
|
||||||
my $room = $FW_webArgs{room};
|
my $fw_room = $FW_webArgs{room};
|
||||||
$room = "&detail=$FW_webArgs{detail}" if( $FW_webArgs{"detail"} );
|
$fw_room = "&detail=$FW_webArgs{detail}" if( $FW_webArgs{"detail"} );
|
||||||
my $srf = $room ? "&room=$room" : "";
|
my $srf = $fw_room ? "&room=$fw_room" : "";
|
||||||
$srf = $room if( $room && $room =~ m/^&/ );
|
$srf = $fw_room if( $fw_room && $fw_room =~ m/^&/ );
|
||||||
$txt = "<a href=\"$FW_ME$FW_subdir?$link$srf\">$txt</a>";
|
$txt = "<a href=\"$FW_ME$FW_subdir?$link$srf\">$txt</a>";
|
||||||
}
|
}
|
||||||
if( !$devStateIcon ) {
|
if( !$devStateIcon ) {
|
||||||
@ -568,13 +568,13 @@ readingsGroup_value2html($$$$$$$$$)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
my $room = $FW_webArgs{room};
|
my $fw_room = $FW_webArgs{room};
|
||||||
$room = "&detail=$FW_webArgs{detail}" if( $FW_webArgs{"detail"} );
|
$fw_room = "&detail=$FW_webArgs{detail}" if( $FW_webArgs{"detail"} );
|
||||||
|
|
||||||
my $htmlTxt;
|
my $htmlTxt;
|
||||||
foreach my $fn (sort keys %{$data{webCmdFn}}) {
|
foreach my $fn (sort keys %{$data{webCmdFn}}) {
|
||||||
no strict "refs";
|
no strict "refs";
|
||||||
$htmlTxt = &{$data{webCmdFn}{$fn}}($FW_wname,$name,$room,$set,$values);
|
$htmlTxt = &{$data{webCmdFn}{$fn}}($FW_wname,$name,$fw_room,$set,$values);
|
||||||
use strict "refs";
|
use strict "refs";
|
||||||
last if(defined($htmlTxt));
|
last if(defined($htmlTxt));
|
||||||
}
|
}
|
||||||
@ -648,6 +648,7 @@ readingsGroup_2html($;$)
|
|||||||
my($hash,$extPage) = @_;
|
my($hash,$extPage) = @_;
|
||||||
$hash = $defs{$hash} if( ref($hash) ne 'HASH' );
|
$hash = $defs{$hash} if( ref($hash) ne 'HASH' );
|
||||||
return undef if( !$hash );
|
return undef if( !$hash );
|
||||||
|
return undef if( !$FW_ME );
|
||||||
return undef if( !$init_done );
|
return undef if( !$init_done );
|
||||||
|
|
||||||
#if( $hash->{fhem}->{cached} && $hash->{fhem}->{lastDefChange} && $hash->{fhem}->{lastDefChange} == $lastDefChange ) {
|
#if( $hash->{fhem}->{cached} && $hash->{fhem}->{lastDefChange} && $hash->{fhem}->{lastDefChange} == $lastDefChange ) {
|
||||||
@ -888,13 +889,13 @@ readingsGroup_2html($;$)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
my $room = $FW_webArgs{room};
|
my $fw_room = $FW_webArgs{room};
|
||||||
$room = "&detail=$FW_webArgs{detail}" if( $FW_webArgs{"detail"} );
|
$fw_room = "&detail=$FW_webArgs{detail}" if( $FW_webArgs{"detail"} );
|
||||||
|
|
||||||
my $htmlTxt;
|
my $htmlTxt;
|
||||||
foreach my $fn (sort keys %{$data{webCmdFn}}) {
|
foreach my $fn (sort keys %{$data{webCmdFn}}) {
|
||||||
no strict "refs";
|
no strict "refs";
|
||||||
$htmlTxt = &{$data{webCmdFn}{$fn}}($FW_wname,$name,$room,$set,$values);
|
$htmlTxt = &{$data{webCmdFn}{$fn}}($FW_wname,$name,$fw_room,$set,$values);
|
||||||
use strict "refs";
|
use strict "refs";
|
||||||
last if(defined($htmlTxt));
|
last if(defined($htmlTxt));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user