diff options
author | Ermal <eri@pfsense.org> | 2013-01-05 16:53:59 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2013-01-05 16:53:59 +0000 |
commit | cf0dae69a13300e34ab7d3b6203f048debf58ff5 (patch) | |
tree | 58b87021219d4b8c584f68e5f2400989bb57fc8b /etc | |
parent | 7ba99a6c441cd5b4b0d4aa1e802266e16d52e1ec (diff) | |
download | pfsense-cf0dae69a13300e34ab7d3b6203f048debf58ff5.zip pfsense-cf0dae69a13300e34ab7d3b6203f048debf58ff5.tar.gz |
Since php_sapi_name() is useless in pfSense test if argc has been registered or not to avoid warnings on bootup
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/config.lib.inc | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/etc/inc/config.lib.inc b/etc/inc/config.lib.inc index 1647d7d..e258510 100644 --- a/etc/inc/config.lib.inc +++ b/etc/inc/config.lib.inc @@ -497,13 +497,15 @@ function write_config($desc="Unknown", $backup = true) { log_error("WARNING! Configuration written on bootup. This can cause stray openvpn and load balancing items in config.xml"); */ - if (!session_id()) - session_start(); - if (!empty($_SESSION['Username']) && ($_SESSION['Username'] != "admin")) { - $user = getUserEntry($_SESSION['Username']); - if (is_array($user) && userHasPrivilege($user, "user-config-readonly")) { - session_commit(); - return false; + if (!isset($argc)) { + if (!session_id()) + session_start(); + if (!empty($_SESSION['Username']) && ($_SESSION['Username'] != "admin")) { + $user = getUserEntry($_SESSION['Username']); + if (is_array($user) && userHasPrivilege($user, "user-config-readonly")) { + session_commit(); + return false; + } } } |