mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-21 01:46:08 +00:00
FHEMWEB: fixing floorplan issues
git-svn-id: https://svn.fhem.de/fhem/trunk@7574 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
d02a4c244e
commit
d74e7ab2d8
@ -507,8 +507,8 @@ FW_answerCall($)
|
|||||||
|
|
||||||
my ($dir1, $dirN, $ofile) = ($1, $2, $3)
|
my ($dir1, $dirN, $ofile) = ($1, $2, $3)
|
||||||
if($arg =~ m,^$FW_ME/([^/]*)(.*/)([^/]*)$,);
|
if($arg =~ m,^$FW_ME/([^/]*)(.*/)([^/]*)$,);
|
||||||
if($dir1 && $dir1 eq "icons") {
|
if($arg =~ m,^$FW_ME/icons/(.*)$,) {
|
||||||
my ($icon,$cacheable) = (urlDecode($ofile), 1);
|
my ($icon,$cacheable) = (urlDecode($1), 1);
|
||||||
my $iconPath = FW_iconPath($icon);
|
my $iconPath = FW_iconPath($icon);
|
||||||
|
|
||||||
# if we do not have the icon, we convert the device state to the icon name
|
# if we do not have the icon, we convert the device state to the icon name
|
||||||
@ -1464,7 +1464,7 @@ FW_fileList($)
|
|||||||
my @ret;
|
my @ret;
|
||||||
return @ret if(!opendir(DH, $dir));
|
return @ret if(!opendir(DH, $dir));
|
||||||
while(my $f = readdir(DH)) {
|
while(my $f = readdir(DH)) {
|
||||||
next if($f !~ m,^$re$,);
|
next if($f !~ m,^$re$, || $f eq "99_Utils.pm");
|
||||||
push(@ret, $f);
|
push(@ret, $f);
|
||||||
}
|
}
|
||||||
closedir(DH);
|
closedir(DH);
|
||||||
@ -1512,12 +1512,15 @@ FW_returnFileAsStream($$$$$)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!open(FH, $path)) {
|
if(!open(FH, $path)) {
|
||||||
Log3 $FW_wname, 4, "FHEMWEB $FW_wname $path: $!";
|
my $npath = FW_fileNameToPath($1) if($path =~ m,([^/]*)$,);
|
||||||
TcpServer_WriteBlocking($FW_chash,
|
if(!open(FH, $npath)) { # Old style fake path
|
||||||
"HTTP/1.1 404 Not Found\r\n".
|
Log3 $FW_wname, 4, "FHEMWEB $FW_wname $path: $!";
|
||||||
"Content-Length:0\r\n\r\n");
|
TcpServer_WriteBlocking($FW_chash,
|
||||||
FW_closeConn($FW_chash);
|
"HTTP/1.1 404 Not Found\r\n".
|
||||||
return 0;
|
"Content-Length:0\r\n\r\n");
|
||||||
|
FW_closeConn($FW_chash);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
binmode(FH) if($type !~ m/text/); # necessary for Windows
|
binmode(FH) if($type !~ m/text/); # necessary for Windows
|
||||||
|
|
||||||
@ -1687,7 +1690,7 @@ FW_style($$)
|
|||||||
if(!configDBUsed());
|
if(!configDBUsed());
|
||||||
FW_displayFileList("Own modules and helper files",
|
FW_displayFileList("Own modules and helper files",
|
||||||
FW_fileList("$MW_dir/^(.*sh|[0-9][0-9].*Util.*pm|.*cfg|.*holiday".
|
FW_fileList("$MW_dir/^(.*sh|[0-9][0-9].*Util.*pm|.*cfg|.*holiday".
|
||||||
"|.*layout)\$"));
|
"|myUtilsTemplate.pm|.*layout)\$"));
|
||||||
FW_displayFileList("gplot files",
|
FW_displayFileList("gplot files",
|
||||||
FW_fileList("$FW_gplotdir/^.*gplot\$"));
|
FW_fileList("$FW_gplotdir/^.*gplot\$"));
|
||||||
FW_displayFileList("styles",
|
FW_displayFileList("styles",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user