mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 12:49:34 +00:00
configDB: minor bugfixing, code cleanup
git-svn-id: https://svn.fhem.de/fhem/trunk@7884 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
80ace0c35f
commit
f788078b87
@ -35,7 +35,7 @@ sub CommandConfigdb($$) {
|
||||
given ($cmd) {
|
||||
|
||||
when ('attr') {
|
||||
Log3('configdb', 4, 'configdb: attr $param1 $param2 requested.');
|
||||
Log3('configdb', 4, "configdb: attr $param1 $param2 requested.");
|
||||
if ($param1 eq "" && $param2 eq "") {
|
||||
# list attributes
|
||||
foreach my $c (sort keys %{$configDB{attr}}) {
|
||||
|
@ -982,17 +982,16 @@ sub _cfgDB_Fileexport($;$) {
|
||||
$sth->execute();
|
||||
my $blobContent = $sth->fetchrow_array();
|
||||
my $counter = length($blobContent);
|
||||
$sth->finish();
|
||||
$fhem_dbh->disconnect();
|
||||
return "No data found for file $filename" unless $counter;
|
||||
|
||||
return ($blobContent,$counter) if $raw;
|
||||
|
||||
open( FILE,">$filename" );
|
||||
binmode(FILE);
|
||||
print FILE $blobContent;
|
||||
close( FILE );
|
||||
|
||||
$sth->finish();
|
||||
$fhem_dbh->disconnect();
|
||||
return "$counter bytes written from database into file $filename" unless $raw;
|
||||
return ($blobContent,$counter);
|
||||
return "$counter bytes written from database into file $filename";
|
||||
}
|
||||
|
||||
# import file into database
|
||||
|
Loading…
Reference in New Issue
Block a user