diff --git a/fhem/CHANGED b/fhem/CHANGED index e7a5a3ddb..71b4a5fbc 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,5 +1,6 @@ # 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. + - feature: configDB.pm: show version counter in "configDB saved. (xx)" - feature: 93_DbLog: possible use of alternative tables for SVG Plots Forum:134547, fix warnings - change: 98_DOIFtools: delete Internal DEF. diff --git a/fhem/configDB.pm b/fhem/configDB.pm index f501506cc..757d7808d 100644 --- a/fhem/configDB.pm +++ b/fhem/configDB.pm @@ -184,6 +184,8 @@ # # 2023-08-07 - fixed missing uuid in migration process # +# 2023-08-23 - added show version counter in save message +# ############################################################################## =cut @@ -532,7 +534,8 @@ sub cfgDB_SaveCfg { ## prototype used in fhem.pl # Insert @rowList into database table 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; foreach (@rowList) { _cfgDB_InsertLine($fhem_dbh, $uuid, $_, $counter); @@ -543,7 +546,7 @@ sub cfgDB_SaveCfg { ## prototype used in fhem.pl my $maxVersions = $configDB{attr}{maxversions}; $maxVersions = ($maxVersions) ? $maxVersions : 0; _cfgDB_Reorg($maxVersions,1) if($maxVersions && $internal != -1); - return 'configDB saved.'; + return "configDB saved. ($num)"; } # save statefile @@ -861,7 +864,7 @@ sub _cfgDB_Rotate { $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.") if ($count > 20 && !defined($configDB{attr}{maxversions})); - return $uuid; + return "$count:$uuid"; } sub _cfgDB_filesize_str {