mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-01 20:20:10 +00:00
configDB.pm: log a message if more than 20 versions
git-svn-id: https://svn.fhem.de/fhem/trunk@26297 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
95625a722f
commit
d27d9f2e15
@ -859,7 +859,8 @@ sub _cfgDB_Rotate {
|
|||||||
$configDB{loaded} = $uuid;
|
$configDB{loaded} = $uuid;
|
||||||
my $count = $fhem_dbh->do("UPDATE fhemversions SET VERSION = VERSION+1 where VERSION >= 0") if $newversion == 0;
|
my $count = $fhem_dbh->do("UPDATE fhemversions SET VERSION = VERSION+1 where VERSION >= 0") if $newversion == 0;
|
||||||
$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.") if ($count > 20);
|
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 $uuid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user