diff options
author | PiBa-NL <pba_2k3@yahoo.com> | 2017-02-27 22:33:25 +0100 |
---|---|---|
committer | PiBa-NL <pba_2k3@yahoo.com> | 2017-02-27 22:51:31 +0100 |
commit | 82cd6022de7483d9e05b8a8f02100e5adb4e9f6e (patch) | |
tree | 3e9fde7eda898aa73f385c6cec0a84b834b3c88e /src/etc/inc/config.lib.inc | |
parent | 69860ee4f5ff9f1e5b87bc6fdcb6dfea66062726 (diff) | |
download | pfsense-82cd6022de7483d9e05b8a8f02100e5adb4e9f6e.zip pfsense-82cd6022de7483d9e05b8a8f02100e5adb4e9f6e.tar.gz |
phpsessionmanager, this helps starting and committing the php session preventing other requests from being blocked longer than required.
Diffstat (limited to 'src/etc/inc/config.lib.inc')
-rw-r--r-- | src/etc/inc/config.lib.inc | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/etc/inc/config.lib.inc b/src/etc/inc/config.lib.inc index 21aeb11..252b3b2 100644 --- a/src/etc/inc/config.lib.inc +++ b/src/etc/inc/config.lib.inc @@ -443,21 +443,19 @@ function write_config($desc="Unknown", $backup = true, $write_config_only = fals global $config, $g; if (!empty($_SERVER['REMOTE_ADDR'])) { - if (!session_id()) { - @session_start(); - } + @phpsession_begin(); if (!empty($_SESSION['Username']) && ($_SESSION['Username'] != "admin")) { $user = getUserEntry($_SESSION['Username']); if (is_array($user) && userHasPrivilege($user, "user-config-readonly")) { - session_commit(); + phpsession_end(true); return false; } } + if (!isset($argc)) { + phpsession_end(true); + } } - if (!isset($argc)) { - session_commit(); - } if ($backup) { backup_config(); |