mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-03 16:56:54 +00:00
configdb - added command "fileshow" to display file content
git-svn-id: https://svn.fhem.de/fhem/trunk@5595 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
a8e5d2df39
commit
99f59ee857
@ -226,6 +226,11 @@ sub CommandConfigdb($$) {
|
||||
return _cfgDB_Filelist;
|
||||
}
|
||||
|
||||
when ('fileshow') {
|
||||
my $r = _cfgDB_Readfile($param1);
|
||||
return ($r)?$r:"File $param1 not found in database.";
|
||||
}
|
||||
|
||||
when ('info') {
|
||||
Log3('configdb', 4, "info requested.");
|
||||
$ret = _cfgDB_Info;
|
||||
|
@ -749,7 +749,7 @@ sub _cfgDB_Writefile($$) {
|
||||
$fhem_dbh->do("delete from fhemfilesave where filename = '$filename'");
|
||||
my $sth = $fhem_dbh->prepare('INSERT INTO fhemfilesave values (?, ?)');
|
||||
foreach (@c){
|
||||
$sth->execute($filename,$_);
|
||||
$sth->execute($filename,rtrim($_));
|
||||
}
|
||||
$sth->finish();
|
||||
$fhem_dbh->commit();
|
||||
|
Loading…
x
Reference in New Issue
Block a user