From be946b36e3f5e13c927c78ee110669eba1186949 Mon Sep 17 00:00:00 2001 From: betateilchen <> Date: Sat, 19 Apr 2014 21:05:08 +0000 Subject: [PATCH] configDB - added new commands filelist and filedelete git-svn-id: https://svn.fhem.de/fhem/trunk@5574 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/configDB.pm | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/fhem/configDB.pm b/fhem/configDB.pm index a347dd3e2..95c905b1b 100644 --- a/fhem/configDB.pm +++ b/fhem/configDB.pm @@ -682,6 +682,21 @@ sub _cfgDB_Filelist { return $ret; } +sub _cfgDB_Readlayout($) { + my ($filename) = @_; + my $fhem_dbh = _cfgDB_Connect; + my $sth = $fhem_dbh->prepare( "SELECT line FROM fhemfilesave WHERE filename = '$filename'" ); + $sth->execute(); + my @layout; + while (my @line = $sth->fetchrow_array()) { + push @layout, "$line[0] "; + } + $sth->finish(); + $fhem_dbh->disconnect(); + return (int(@layout)) ? join("\n",@layout) : undef; +} + + 1; =pod