diff options
author | stilez <stilez@users.noreply.github.com> | 2016-05-24 10:25:11 +0100 |
---|---|---|
committer | Stephen Beaver <sbeaver@netgate.com> | 2016-06-22 11:12:39 -0400 |
commit | 3d256eb10a81be7c67634b9a677c8ae8d230c5dc (patch) | |
tree | ea3f580a217429b4930bd60317e98ef3a4b8c650 /src | |
parent | 8537c4a61ce0c5b70c7464871b5b5e488130eaaa (diff) | |
download | pfsense-3d256eb10a81be7c67634b9a677c8ae8d230c5dc.zip pfsense-3d256eb10a81be7c67634b9a677c8ae8d230c5dc.tar.gz |
Use global backup count instead of hardcoded value and remove redundant function
(cherry picked from commit 01b5410ae8391998ba560d40f447c7f556472c5b)
Diffstat (limited to 'src')
-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; |