fixed an issue with 0 not passed or passed as empty minCount; Now forcing it to 0 if empty

This commit is contained in:
Klaus Leithoff 2009-08-27 13:14:54 +00:00
parent 38d7aa2b98
commit 5378561274

View File

@ -81,16 +81,16 @@ if ($_POST['save_backup_settings'])
if ($_POST['backup_files']==='backup_files') $filesBackup = true;
if (empty($minCount))
{
$minCount = 0;
$setup_tpl->set_var('error_msg',htmlspecialchars(lang("'%1' must be integer", lang("backup min count"))));
}
else
{
$configValues = array(
'backup_mincount'=>$minCount,
'backup_files' =>$filesBackup,
);
$db_backup->saveConfig($configValues);
if (is_int($minCount) && $minCount>0)
{
$cleaned_files = array();
/* Remove old backups. */
$db_backup->housekeeping(&$cleaned_files);