mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-01 20:20:10 +00:00
98_template: handling ReadFile from configDB
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@13688 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
f48d66f2b9
commit
eb69c13855
@ -16,8 +16,7 @@ sub EvaluateTemplate($$) {
|
|||||||
|
|
||||||
# load template from file
|
# load template from file
|
||||||
my ($err, @result)= FileRead($filename);
|
my ($err, @result)= FileRead($filename);
|
||||||
return ($err, undef, undef, undef) if(defined($err));
|
return ($err, undef, undef, undef) if(defined($err) && $err ne "");
|
||||||
|
|
||||||
# remove trailing newlines and empty/whitespace lines
|
# remove trailing newlines and empty/whitespace lines
|
||||||
@result= grep /\S/, map { s/\r?\n$//; $_ } @result;
|
@result= grep /\S/, map { s/\r?\n$//; $_ } @result;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user