mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-16 16:56:04 +00:00
01_FHEMWEB.pm: more precise FWEXT checking to allow subdirectories for FWEXT. Forum #32103.
git-svn-id: https://svn.fhem.de/fhem/trunk@7564 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
af38ff0483
commit
f32751739b
@ -504,8 +504,11 @@ FW_answerCall($)
|
||||
|
||||
# /icons/... => current state of ...
|
||||
# also used for static images: unintended, but too late to change
|
||||
if($arg =~ m,^$FW_ME/icons/(.*)$,) {
|
||||
my ($icon,$cacheable) = (urlDecode($1), 1);
|
||||
|
||||
my ($dir1, $dirN, $ofile) = ($1, $2, $3)
|
||||
if($arg =~ m,^$FW_ME/([^/]*)(.*/)([^/]*)$,);
|
||||
if($dir1 && $dir1 eq "icons") {
|
||||
my ($icon,$cacheable) = (urlDecode($ofile), 1);
|
||||
my $iconPath = FW_iconPath($icon);
|
||||
|
||||
# if we do not have the icon, we convert the device state to the icon name
|
||||
@ -518,8 +521,9 @@ FW_answerCall($)
|
||||
$iconPath =~ m/(.*)\.([^.]*)/;
|
||||
return FW_serveSpecial($1, $2, $FW_icondir, $cacheable);
|
||||
|
||||
} elsif($arg =~ m,^$FW_ME/(.*)/([^/]*)$, && !$data{FWEXT}{"/$1"}) {
|
||||
my ($dir, $ofile, $ext) = ($1, $2, "");
|
||||
} elsif($dir1 && !$data{FWEXT}{"/$dir1"}) {
|
||||
my $dir = "$dir1$dirN";
|
||||
my $ext = "";
|
||||
$dir =~ s/\.\.//g;
|
||||
$dir =~ s,www/,,g; # Want commandref.html to work from file://...
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user