Commit a35211fd authored by Franco Fichtner's avatar Franco Fichtner

configuration: do not allow zero backups

parent 3161dece
......@@ -89,8 +89,8 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
$pconfig = $_POST;
if (!empty($pconfig['save'])) {
if (!isset($pconfig['backupcount']) || !is_numeric($pconfig['backupcount']) || $pconfig['backupcount'] < 0) {
$input_errors[] = gettext('Backup count must be greater or equal to zero.');
if (!isset($pconfig['backupcount']) || !is_numeric($pconfig['backupcount']) || $pconfig['backupcount'] <= 0) {
$input_errors[] = gettext('Backup count must be greater than zero.');
}
if (count($input_errors) == 0) {
$config['system']['backupcount'] = $pconfig['backupcount'];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment