mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-22 20:24:36 +00:00
02_RSS.pm: enable layout storage in configDB
git-svn-id: https://svn.fhem.de/fhem/trunk@5582 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
ef76aa27cd
commit
6bb92946a7
@ -62,6 +62,15 @@ RSS_readLayout($) {
|
|||||||
my $filename= $hash->{fhem}{filename};
|
my $filename= $hash->{fhem}{filename};
|
||||||
my $name= $hash->{NAME};
|
my $name= $hash->{NAME};
|
||||||
|
|
||||||
|
if($attr{global}{configfile} eq 'configDB') {
|
||||||
|
my $layout = _cfgDB_Readlayout($filename);
|
||||||
|
if(!(defined($layout))) {
|
||||||
|
$hash->{fhem}{layout}= ("text 0.1 0.1 'Layout definition not found in database!'");
|
||||||
|
Log 1, "RSS $name: Layout $filename not found in database";
|
||||||
|
} else {
|
||||||
|
$hash->{fhem}{layout} = $layout;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
if(open(LAYOUT, $filename)) {
|
if(open(LAYOUT, $filename)) {
|
||||||
my @layout= <LAYOUT>;
|
my @layout= <LAYOUT>;
|
||||||
$hash->{fhem}{layout}= join("", @layout);
|
$hash->{fhem}{layout}= join("", @layout);
|
||||||
@ -71,6 +80,8 @@ RSS_readLayout($) {
|
|||||||
Log 1, "RSS $name: Cannot open $filename";
|
Log 1, "RSS $name: Cannot open $filename";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
##################
|
##################
|
||||||
sub
|
sub
|
||||||
|
Loading…
x
Reference in New Issue
Block a user