2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-02-08 05:15:10 +00:00

Fixing Floorplan, second try.

git-svn-id: https://svn.fhem.de/fhem/trunk@2688 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2013-02-11 13:46:34 +00:00
parent a5853fe817
commit a759976dba

View File

@ -466,8 +466,10 @@ FW_answerCall($)
return FW_serveSpecial($1, $2, $FW_icondir, $cacheable); return FW_serveSpecial($1, $2, $FW_icondir, $cacheable);
} elsif($arg =~ m,^$FW_ME/(.*)/([^/]*),) { } elsif($arg =~ m,^$FW_ME/(.*)/([^/]*),) {
my ($dir, $file, $ext) = ($1, $2, ""); my ($dir, $ofile, $ext) = ($1, $2, "");
$dir =~ s/\.\.//g; $dir =~ s/\.\.//g;
my $file = $ofile;
if($file =~ m/^(.*)\.([^.]*)$/) { if($file =~ m/^(.*)\.([^.]*)$/) {
$file = $1; $ext = $2; $file = $1; $ext = $2;
} }
@ -475,8 +477,12 @@ FW_answerCall($)
return FW_serveSpecial($file, $ext, "$FW_dir/$dir", return FW_serveSpecial($file, $ext, "$FW_dir/$dir",
($arg =~ m/nocache/) ? 0 : 1); ($arg =~ m/nocache/) ? 0 : 1);
} }
$arg = "/$dir/$ofile";
} elsif($arg !~ m/^$FW_ME(.*)/) { } elsif($arg =~ m/^$FW_ME(.*)/) {
$arg = $1; # The stuff behind FW_ME, continue to check for commands/FWEXT
} else {
my $c = $me->{CD}; my $c = $me->{CD};
Log 4, "$FW_wname: redirecting $arg to $FW_ME"; Log 4, "$FW_wname: redirecting $arg to $FW_ME";
print $c "HTTP/1.1 302 Found\r\n", print $c "HTTP/1.1 302 Found\r\n",
@ -486,7 +492,6 @@ FW_answerCall($)
} }
$arg = $1; # The stuff behind FW_ME
$FW_plotmode = AttrVal($FW_wname, "plotmode", "SVG"); $FW_plotmode = AttrVal($FW_wname, "plotmode", "SVG");
$FW_plotsize = AttrVal($FW_wname, "plotsize", $FW_ss ? "480,160" : $FW_plotsize = AttrVal($FW_wname, "plotsize", $FW_ss ? "480,160" :