mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-03 13:45:36 +00:00
01_FHEMWEB.pm: fix second attr redirect after select icon (Forum #131231)
git-svn-id: https://svn.fhem.de/fhem/trunk@26927 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
4ae75924c3
commit
e554a7352f
@ -916,16 +916,12 @@ FW_answerCall($)
|
|||||||
} else {
|
} else {
|
||||||
my $redirectTo = AttrVal($FW_wname, "redirectTo","");
|
my $redirectTo = AttrVal($FW_wname, "redirectTo","");
|
||||||
if($redirectTo) {
|
if($redirectTo) {
|
||||||
Log3 $FW_wname, 1, "$FW_wname: redirecting $arg to $FW_ME/$redirectTo$arg";
|
Log3 $FW_wname, 1,"$FW_wname: redirecting $arg to $FW_ME/$redirectTo$arg";
|
||||||
return FW_answerCall("$FW_ME/$redirectTo$arg")
|
return FW_answerCall("$FW_ME/$redirectTo$arg")
|
||||||
}
|
}
|
||||||
|
|
||||||
Log3 $FW_wname, 4, "$FW_wname: redirecting $arg to $FW_ME";
|
Log3 $FW_wname, 4, "$FW_wname: redirecting $arg to $FW_ME";
|
||||||
TcpServer_WriteBlocking($me,
|
FW_redirect($FW_ME);
|
||||||
"HTTP/1.1 302 Found\r\n".
|
|
||||||
"Content-Length: 0\r\n".
|
|
||||||
$FW_headerlines.
|
|
||||||
"Location: $FW_ME\r\n\r\n");
|
|
||||||
FW_closeConn($FW_chash);
|
FW_closeConn($FW_chash);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -1040,11 +1036,7 @@ FW_answerCall($)
|
|||||||
if($FW_detail) { $tgt .= "?detail=$FW_detail&fw_id=$FW_id" }
|
if($FW_detail) { $tgt .= "?detail=$FW_detail&fw_id=$FW_id" }
|
||||||
elsif($FW_room) { $tgt .= "?room=".urlEncode($FW_room)."&fw_id=$FW_id" }
|
elsif($FW_room) { $tgt .= "?room=".urlEncode($FW_room)."&fw_id=$FW_id" }
|
||||||
else { $tgt .= "?fw_id=$FW_id" }
|
else { $tgt .= "?fw_id=$FW_id" }
|
||||||
TcpServer_WriteBlocking($me,
|
FW_redirect($tgt);
|
||||||
"HTTP/1.1 302 Found\r\n".
|
|
||||||
"Content-Length: 0\r\n". $FW_headerlines.
|
|
||||||
"Location: $tgt\r\n".
|
|
||||||
"\r\n");
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1225,6 +1217,18 @@ FW_answerCall($)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub
|
||||||
|
FW_redirect($)
|
||||||
|
{
|
||||||
|
my ($tgt) = @_;
|
||||||
|
|
||||||
|
TcpServer_WriteBlocking($defs{$FW_cname},
|
||||||
|
"HTTP/1.1 302 Found\r\n".
|
||||||
|
"Content-Length: 0\r\n".
|
||||||
|
$FW_headerlines.
|
||||||
|
"Location: $tgt\r\n\r\n");
|
||||||
|
}
|
||||||
|
|
||||||
sub
|
sub
|
||||||
FW_dataAttr()
|
FW_dataAttr()
|
||||||
{
|
{
|
||||||
@ -2637,7 +2641,7 @@ FW_style($$)
|
|||||||
|
|
||||||
} elsif($a[1] eq "setIF") {
|
} elsif($a[1] eq "setIF") {
|
||||||
FW_fC("attr $a[2] icon $a[3]");
|
FW_fC("attr $a[2] icon $a[3]");
|
||||||
FW_doDetail($a[2]);
|
FW_redirect("$FW_ME?detail=$a[2]");
|
||||||
|
|
||||||
} elsif($a[1] eq "showDSI") {
|
} elsif($a[1] eq "showDSI") {
|
||||||
FW_iconTable("devStateIcon", "",
|
FW_iconTable("devStateIcon", "",
|
||||||
@ -2647,7 +2651,7 @@ FW_style($$)
|
|||||||
my $dsi = AttrVal($a[2], "devStateIcon", "");
|
my $dsi = AttrVal($a[2], "devStateIcon", "");
|
||||||
$dsi .= " " if($dsi);
|
$dsi .= " " if($dsi);
|
||||||
FW_fC("attr $a[2] devStateIcon $dsi$FW_data:$a[3]");
|
FW_fC("attr $a[2] devStateIcon $dsi$FW_data:$a[3]");
|
||||||
FW_doDetail($a[2]);
|
FW_redirect("$FW_ME?detail=$a[2]");
|
||||||
|
|
||||||
} elsif($a[1] eq "eventMonitor") {
|
} elsif($a[1] eq "eventMonitor") {
|
||||||
FW_pO "<script type=\"text/javascript\" src=\"$FW_ME/pgm2/console.js\">".
|
FW_pO "<script type=\"text/javascript\" src=\"$FW_ME/pgm2/console.js\">".
|
||||||
|
Loading…
x
Reference in New Issue
Block a user