mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-02-25 09:55:38 +00:00
configDB.pm: show version counter in save message
git-svn-id: https://svn.fhem.de/fhem/trunk@27886 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
d14372ee04
commit
c06dc6db15
@ -1,5 +1,6 @@
|
|||||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
||||||
# Do not insert empty lines here, update check depends on it.
|
# Do not insert empty lines here, update check depends on it.
|
||||||
|
- feature: configDB.pm: show version counter in "configDB saved. (xx)"
|
||||||
- feature: 93_DbLog: possible use of alternative tables for SVG Plots
|
- feature: 93_DbLog: possible use of alternative tables for SVG Plots
|
||||||
Forum:134547, fix warnings
|
Forum:134547, fix warnings
|
||||||
- change: 98_DOIFtools: delete Internal DEF.
|
- change: 98_DOIFtools: delete Internal DEF.
|
||||||
|
@ -184,6 +184,8 @@
|
|||||||
#
|
#
|
||||||
# 2023-08-07 - fixed missing uuid in migration process
|
# 2023-08-07 - fixed missing uuid in migration process
|
||||||
#
|
#
|
||||||
|
# 2023-08-23 - added show version counter in save message
|
||||||
|
#
|
||||||
##############################################################################
|
##############################################################################
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
@ -532,7 +534,8 @@ sub cfgDB_SaveCfg { ## prototype used in fhem.pl
|
|||||||
|
|
||||||
# Insert @rowList into database table
|
# Insert @rowList into database table
|
||||||
my $fhem_dbh = _cfgDB_Connect;
|
my $fhem_dbh = _cfgDB_Connect;
|
||||||
my $uuid = _cfgDB_Rotate($fhem_dbh,$internal);
|
my ($num,$uuid) = split(/\:/,_cfgDB_Rotate($fhem_dbh,$internal));
|
||||||
|
Debug "num: $num uuid: $uuid";
|
||||||
my $counter = 0;
|
my $counter = 0;
|
||||||
foreach (@rowList) {
|
foreach (@rowList) {
|
||||||
_cfgDB_InsertLine($fhem_dbh, $uuid, $_, $counter);
|
_cfgDB_InsertLine($fhem_dbh, $uuid, $_, $counter);
|
||||||
@ -543,7 +546,7 @@ sub cfgDB_SaveCfg { ## prototype used in fhem.pl
|
|||||||
my $maxVersions = $configDB{attr}{maxversions};
|
my $maxVersions = $configDB{attr}{maxversions};
|
||||||
$maxVersions = ($maxVersions) ? $maxVersions : 0;
|
$maxVersions = ($maxVersions) ? $maxVersions : 0;
|
||||||
_cfgDB_Reorg($maxVersions,1) if($maxVersions && $internal != -1);
|
_cfgDB_Reorg($maxVersions,1) if($maxVersions && $internal != -1);
|
||||||
return 'configDB saved.';
|
return "configDB saved. ($num)";
|
||||||
}
|
}
|
||||||
|
|
||||||
# save statefile
|
# save statefile
|
||||||
@ -861,7 +864,7 @@ sub _cfgDB_Rotate {
|
|||||||
$fhem_dbh->do("INSERT INTO fhemversions values ('$newversion', '$uuid', NULL)");
|
$fhem_dbh->do("INSERT INTO fhemversions values ('$newversion', '$uuid', NULL)");
|
||||||
Log3(undef,1,"configDB: more than 20 versions in database! Please consider setting a limit.")
|
Log3(undef,1,"configDB: more than 20 versions in database! Please consider setting a limit.")
|
||||||
if ($count > 20 && !defined($configDB{attr}{maxversions}));
|
if ($count > 20 && !defined($configDB{attr}{maxversions}));
|
||||||
return $uuid;
|
return "$count:$uuid";
|
||||||
}
|
}
|
||||||
|
|
||||||
sub _cfgDB_filesize_str {
|
sub _cfgDB_filesize_str {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user