Project

General

Profile

« Previous | Next » 

Revision 16b17c15

Added by Stilez y about 9 years ago

fix logic and replace hard coded value by global

backups should be a numeric int.
text hint for number of backups can now refer to the global value for this platform (and explains how to get that default, by leaving blank)

View differences:

src/usr/local/www/diag_confbak.php
64 64
require("guiconfig.inc");
65 65

  
66 66
if (isset($_POST['backupcount'])) {
67
	if (is_numeric($_POST['backupcount']) && ($_POST['backupcount'] >= 0)) {
67
	if (is_numericint($_POST['backupcount']) && ($_POST['backupcount'] >= 0)) {
68 68
		$config['system']['backupcount'] = $_POST['backupcount'];
69 69
		$changedescr = $config['system']['backupcount'];
70 70
	} else {
......
193 193
	'Backup Count',
194 194
	'number',
195 195
	$config['system']['backupcount']
196
))->setHelp('Maximum number of old configurations to keep in the cache. By default this is 30 for a full install or 5 on NanoBSD. ');
196
))->setHelp('Maximum number of old configurations to keep in the cache, 0 for no backups, or leave blank for the default value (' . $g['default_config_backup_count'] . ' for the current platform).');
197 197

  
198 198
$space = exec("/usr/bin/du -sh /conf/backup | /usr/bin/awk '{print $1;}'");
199 199

  

Also available in: Unified diff