2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-05-05 02:19:31 +00:00

01_FHEMWEB.pm: enable the upload of icons for a hs-harz.de project.

git-svn-id: https://svn.fhem.de/fhem/trunk@9032 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2015-08-08 13:25:18 +00:00
parent bfa3a43ed9
commit 69454ae111

View File

@ -1729,8 +1729,12 @@ FW_fileNameToPath($)
my $cfgFileName = $1;
if($name eq $cfgFileName) {
return $attr{global}{configfile};
} elsif($name =~ m/.*(css|svg)$/) {
} elsif($name =~ m/.*(css|_defs.svg)$/) {
return "$FW_cssdir/$name";
} elsif($name =~ m/.*(png|svg)$/) {
my $d="";
map { $d = $_ if(!$d && -d "$FW_icondir/$_") } @FW_iconDirs;
return "$FW_icondir/$d/$name";
} elsif($name =~ m/.*gplot$/) {
return "$FW_gplotdir/$name";
} else {
@ -1852,6 +1856,7 @@ FW_style($$)
}
my $ret = FW_fC("rereadcfg") if($filePath eq $attr{global}{configfile});
$ret = FW_fC("reload $fileName") if($fileName =~ m,\.pm$,);
$ret = FW_Set("","","rereadicons") if($fileName =~ m,\.(svg|png)$,);
DoTrigger("global", "FILEWRITE $filePath", 1) if(!$ret); # Forum #32592
$ret = ($ret ? "<h3>ERROR:</h3><b>$ret</b>" :
"Saved the file $fileName to $forceType");