Avoid err msg.
git-svn-id: https://fhem.svn.sourceforge.net/svnroot/fhem/trunk/fhem@1041 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
@@ -324,14 +324,14 @@ FW_AnswerCall($)
|
|||||||
if($arg =~ m,^${FW_ME}/(example.*|.*html)$,) {
|
if($arg =~ m,^${FW_ME}/(example.*|.*html)$,) {
|
||||||
my $f = $1;
|
my $f = $1;
|
||||||
$f =~ s,/,,g; # little bit of security
|
$f =~ s,/,,g; # little bit of security
|
||||||
open(FH, "$FW_dir/$f") || return;
|
open(FH, "$FW_dir/$f") || return 0;
|
||||||
pO join("", <FH>);
|
pO join("", <FH>);
|
||||||
close(FH);
|
close(FH);
|
||||||
$FW_RETTYPE = "text/plain; charset=ISO-8859-1" if($f !~ m/\.*html$/);
|
$FW_RETTYPE = "text/plain; charset=ISO-8859-1" if($f !~ m/\.*html$/);
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
} elsif($arg =~ m,^$FW_ME/(.*).css,) {
|
} elsif($arg =~ m,^$FW_ME/(.*).css,) {
|
||||||
open(FH, "$FW_dir/$1.css") || return;
|
open(FH, "$FW_dir/$1.css") || return 0;
|
||||||
pO join("", <FH>);
|
pO join("", <FH>);
|
||||||
close(FH);
|
close(FH);
|
||||||
$FW_RETTYPE = "text/css";
|
$FW_RETTYPE = "text/css";
|
||||||
@@ -345,7 +345,7 @@ FW_AnswerCall($)
|
|||||||
FW_ReadIcons();
|
FW_ReadIcons();
|
||||||
$img = FW_dev2image($img);
|
$img = FW_dev2image($img);
|
||||||
$cachable = 0;
|
$cachable = 0;
|
||||||
return if(!$img || !open(FH, "$FW_dir/$img"));
|
return 0 if(!$img || !open(FH, "$FW_dir/$img"));
|
||||||
}
|
}
|
||||||
binmode (FH); # necessary for Windows
|
binmode (FH); # necessary for Windows
|
||||||
pO join("", <FH>);
|
pO join("", <FH>);
|
||||||
@@ -355,7 +355,7 @@ FW_AnswerCall($)
|
|||||||
return $cachable;
|
return $cachable;
|
||||||
|
|
||||||
} elsif($arg =~ m,^$FW_ME/(.*).js,) { #kpb java include
|
} elsif($arg =~ m,^$FW_ME/(.*).js,) { #kpb java include
|
||||||
open(FH, "$FW_dir/$1.js") || return;
|
open(FH, "$FW_dir/$1.js") || return 0;
|
||||||
pO join("", <FH>);
|
pO join("", <FH>);
|
||||||
close(FH);
|
close(FH);
|
||||||
$FW_RETTYPE = "application/javascript";
|
$FW_RETTYPE = "application/javascript";
|
||||||
|
|||||||
Reference in New Issue
Block a user