SVG: configDB Patch from betateilchen (forum #22690)

git-svn-id: https://svn.fhem.de/fhem/trunk@5607 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig
2014-04-23 10:48:59 +00:00
parent cc1b586728
commit 3b29f0a0b1

View File

@@ -99,13 +99,16 @@ SVG_Set($@)
$hash->{GPLOTFILE} . ":".
$hash->{LOGFILE};
open(SFH, $srcName) || return "Can't open $srcName: $!";
open(DFH, ">$dstName") || return "Can't open $dstName: $!";
while(my $l = <SFH>) {
print DFH $l;
if(configDBUsed()) { # copy template.gplot inside configDB
_cfgDB_Writefile($dstName,_cfgDB_Readfile($srcName));
} else {
open(SFH, $srcName) || return "Can't open $srcName: $!";
open(DFH, ">$dstName") || return "Can't open $dstName: $!";
while(my $l = <SFH>) {
print DFH $l;
}
close(SFH); close(DFH);
}
close(SFH); close(DFH);
return undef;
}