diff options
author | k-paulius <k.dash.paulius@gmail.com> | 2015-02-15 23:31:00 -0600 |
---|---|---|
committer | k-paulius <k.dash.paulius@gmail.com> | 2015-02-15 23:31:00 -0600 |
commit | e2caaee8ef59a1dd2e0389564f6c59798a54664b (patch) | |
tree | cb4f3babe113529760d0c9e1331f20da45e23960 /usr | |
parent | 3b7f8f83033cafd7ba8994cad361241bd3947e62 (diff) | |
download | pfsense-e2caaee8ef59a1dd2e0389564f6c59798a54664b.zip pfsense-e2caaee8ef59a1dd2e0389564f6c59798a54664b.tar.gz |
Fixing issues with NTP RRD graph state changes
- only call enable_rrd_graphing() after $config['ntpd']['statsgraph']
is set
- fix if condition; empty and isset are each other's opposites
Diffstat (limited to 'usr')
-rw-r--r-- | usr/local/www/services_ntpd.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr/local/www/services_ntpd.php b/usr/local/www/services_ntpd.php index 948ef6e..fb7820f 100644 --- a/usr/local/www/services_ntpd.php +++ b/usr/local/www/services_ntpd.php @@ -148,12 +148,14 @@ if ($_POST) { elseif (isset($config['ntpd']['notrap'])) unset($config['ntpd']['notrap']); - if ((empty($_POST['statsgraph'])) != (isset($config['ntpd']['statsgraph']))); - enable_rrd_graphing(); + if ((empty($_POST['statsgraph'])) == (isset($config['ntpd']['statsgraph']))) + $enable_rrd_graphing = true; if (!empty($_POST['statsgraph'])) $config['ntpd']['statsgraph'] = $_POST['statsgraph']; elseif (isset($config['ntpd']['statsgraph'])) unset($config['ntpd']['statsgraph']); + if (!empty($enable_rrd_graphing)) + enable_rrd_graphing(); if (!empty($_POST['leaptxt'])) $config['ntpd']['leapsec'] = base64_encode($_POST['leaptxt']); |