diff options
author | k-paulius <k.dash.paulius@gmail.com> | 2015-02-15 23:31:00 -0600 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2015-02-24 15:40:51 -0300 |
commit | 2e50e5b1fc8ef9b46275163cee2bac7ad87ba14d (patch) | |
tree | eecf325665d1b74bd8d4fcc437fe894af8142efd | |
parent | b5ecfe0f35fc1343256f7926670a36e933582388 (diff) | |
download | pfsense-2e50e5b1fc8ef9b46275163cee2bac7ad87ba14d.zip pfsense-2e50e5b1fc8ef9b46275163cee2bac7ad87ba14d.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
-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']); |