diff options
author | stilez <stilez@users.noreply.github.com> | 2016-05-24 10:25:11 +0100 |
---|---|---|
committer | stilez <stilez@users.noreply.github.com> | 2016-05-24 10:25:11 +0100 |
commit | 01b5410ae8391998ba560d40f447c7f556472c5b (patch) | |
tree | d9ba638789748b73881f8b0d9a3dd9eaa45e08c3 /src/etc | |
parent | 16b17c15f9fc29e9480431b5bc7bebe2bd4b6230 (diff) | |
download | pfsense-01b5410ae8391998ba560d40f447c7f556472c5b.zip pfsense-01b5410ae8391998ba560d40f447c7f556472c5b.tar.gz |
Use global backup count instead of hardcoded value and remove redundant function
Diffstat (limited to 'src/etc')
-rw-r--r-- | src/etc/inc/config.lib.inc | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/etc/inc/config.lib.inc b/src/etc/inc/config.lib.inc index 4285d3d..0a2c921 100644 --- a/src/etc/inc/config.lib.inc +++ b/src/etc/inc/config.lib.inc @@ -792,7 +792,7 @@ function cleanup_backupcache($lock = false) { global $g; $i = false; - $revisions = get_config_backup_count(); + $revisions = intval(is_numericint($config['system']['backupcount']) ? $config['system']['backupcount'] : $g['default_config_backup_count']); if (!$lock) { $lockkey = lock('config'); @@ -997,17 +997,6 @@ function make_config_revision_entry($desc = null, $override_user = null) { return $revision; } -function get_config_backup_count() { - global $config, $g; - if (isset($config['system']['backupcount']) && is_numeric($config['system']['backupcount']) && ($config['system']['backupcount'] >= 0)) { - return intval($config['system']['backupcount']); - } elseif ($g['platform'] == "nanobsd") { - return 5; - } else { - return 30; - } -} - function pfSense_clear_globals() { global $config, $FilterIfList, $GatewaysList, $filterdns, $aliases, $aliastable; |