mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-03 23:06:37 +00:00
%L patch from Mattias
git-svn-id: https://svn.fhem.de/fhem/trunk@2929 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
a134f31fc8
commit
096e14e89a
@ -1184,6 +1184,7 @@ FW_fileList($)
|
|||||||
$fname =~ m,^(.*)/([^/]*)$,; # Split into dir and file
|
$fname =~ m,^(.*)/([^/]*)$,; # Split into dir and file
|
||||||
my ($dir,$re) = ($1, $2);
|
my ($dir,$re) = ($1, $2);
|
||||||
return if(!$re);
|
return if(!$re);
|
||||||
|
$dir =~ s/%L/$attr{global}{logdir}/g if($dir =~ m/%/ && $attr{global}{logdir}); # %L present and log directory defined
|
||||||
$re =~ s/%./[A-Za-z0-9]*/g; # logfile magic (%Y, etc)
|
$re =~ s/%./[A-Za-z0-9]*/g; # logfile magic (%Y, etc)
|
||||||
my @ret;
|
my @ret;
|
||||||
return @ret if(!opendir(DH, $dir));
|
return @ret if(!opendir(DH, $dir));
|
||||||
@ -1281,6 +1282,7 @@ FW_logWrapper($)
|
|||||||
if(defined($type) && $type eq "text") {
|
if(defined($type) && $type eq "text") {
|
||||||
$defs{$d}{logfile} =~ m,^(.*)/([^/]*)$,; # Dir and File
|
$defs{$d}{logfile} =~ m,^(.*)/([^/]*)$,; # Dir and File
|
||||||
my $path = "$1/$file";
|
my $path = "$1/$file";
|
||||||
|
$path =~ s/%L/$attr{global}{logdir}/g if($path =~ m/%/ && $attr{global}{logdir}); # %L present and log directory defined
|
||||||
$path = AttrVal($d,"archivedir","") . "/$file" if(!-f $path);
|
$path = AttrVal($d,"archivedir","") . "/$file" if(!-f $path);
|
||||||
|
|
||||||
FW_pO "<div id=\"content\">";
|
FW_pO "<div id=\"content\">";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user