From a368a026db2e79ef7c48f5db0fbff27da5468c26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ermal=20Lu=E7i?= Date: Tue, 30 Jun 2009 17:11:30 +0000 Subject: * Reorganize the 'apply' button infrustructure in the GUI. - Present three new functions is/mark/clear_subsystem_dirty('name_of_subsystem'). This makes easier to create such things without needing to introduce new globals. - Convert all pages to the new infrustructure - This improves a lot the control on this notification --- usr/local/www/guiconfig.inc | 33 ++------------------------------- 1 file changed, 2 insertions(+), 31 deletions(-) (limited to 'usr/local/www/guiconfig.inc') diff --git a/usr/local/www/guiconfig.inc b/usr/local/www/guiconfig.inc index b094f7d..0ccec83 100755 --- a/usr/local/www/guiconfig.inc +++ b/usr/local/www/guiconfig.inc @@ -44,7 +44,6 @@ if (!$omit_nocacheheaders) { } /* parse the configuration and include all configuration functions */ -require_once("config.inc"); require_once("functions.inc"); /* Pull in all the gui related display classes) */ @@ -71,34 +70,6 @@ foreach($apple_ua as $useragent) if(strstr($_SERVER['HTTP_USER_AGENT'], $useragent)) $g['theme'] = "pfsense"; -$d_landirty_path = $g['varrun_path'] . "/lan.conf.dirty"; -$d_pppoeuserdirty_path = $g['varrun_path'] . "/vpn-pppoe-users-edit.dirty"; -$d_hostsdirty_path = $g['varrun_path'] . "/hosts.dirty"; -$d_natconfdirty_path = $g['varrun_path'] . "/nat.conf.dirty"; -$d_filterconfdirty_path = $g['varrun_path'] . "/filter.conf.dirty"; -$d_ipsecconfdirty_path = $g['varrun_path'] . "/ipsec.conf.dirty"; -$d_shaperconfdirty_path = $g['varrun_path'] . "/shaper.conf.dirty"; -$d_pptpuserdirty_path = $g['varrun_path'] . "/pptpd.user.dirty"; -$d_dnsmasqdirty_path = $g['varrun_path'] . "/dnsmasq.dirty"; -$d_staticmapsdirty_path = $g['varrun_path'] . "/staticmaps.dirty"; -$d_staticroutesdirty_path = $g['varrun_path'] . "/staticroutes.dirty"; -$d_aliasesdirty_path = $g['varrun_path'] . "/aliases.dirty"; -$d_proxyarpdirty_path = $g['varrun_path'] . "/proxyarp.dirty"; -$d_fwupenabled_path = $g['varrun_path'] . "/fwup.enabled"; -$d_firmwarelock_path = $g['varrun_path'] . "/firmware.lock"; -$d_sysrebootreqd_path = $g['varrun_path'] . "/sysreboot.reqd"; -$d_passthrumacsdirty_path = $g['varrun_path'] . "/passthrumacs.dirty"; -$d_allowedipsdirty_path = $g['varrun_path'] . "/allowedips.dirty"; -$d_ovpnclidirty_path = $g['varrun_path'] . "/ovpnclient.dirty"; -$d_vipconfdirty_path = $g['varrun_path'] . "/vip.conf.dirty"; -$d_sysctldirty_path = $g['varrun_path'] . "/sysctl.conf.dirty"; -$d_vsconfdirty_path = $g['varrun_path'] . "/vs.conf.dirty"; -$d_shaperconfdirty_path = $g['varrun_path'] . "/shaper.conf.dirty"; - -/* OpenVPN Directories */ -$d_ovpnsrvdirty_path = "/tmp/ovpn-srv.dirty"; -$d_ovpncrldirty_path = "/tmp/ovpn-crl.dirty"; -$d_ovpnclidirty_path = "/tmp/ovpn-cli.dirty"; /* used by progress bar */ $lastseen = "-1"; @@ -106,7 +77,7 @@ $navlevelsep = ": "; /* navigation level separator string */ $mandfldhtml = ""; /* display this before mandatory input fields */ $mandfldhtmlspc = ""; /* same as above, but with spacing */ -if (file_exists($d_firmwarelock_path)) { +if (is_subsystem_dirty('firmwarelock')) { if (!$d_isfwfile) { header("Location: system_firmware.php"); exit; @@ -1417,4 +1388,4 @@ function download_file_with_progress_bar($url_file, $destination_file, $readbody return ($http_code == 200) ? true : $http_code; } -?> \ No newline at end of file +?> -- cgit v1.1