From 3ba3cba10796ecd6cecaef8c97db22e5e2c859d9 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Wed, 4 Mar 2015 07:04:35 +0100 Subject: [PATCH] src: s/session_commit/session_write_close/g for consistency --- src/etc/inc/authgui.inc | 2 +- src/etc/inc/config.lib.inc | 4 ++-- src/www/firewall_virtual_ip.php | 5 +++-- src/www/headjs.php | 4 +++- src/www/system_firmware_restorefullbackup.php | 1 + src/www/system_usermanager_passwordmg.php | 12 ++++++------ 6 files changed, 16 insertions(+), 12 deletions(-) diff --git a/src/etc/inc/authgui.inc b/src/etc/inc/authgui.inc index 4d3277875..238173a49 100644 --- a/src/etc/inc/authgui.inc +++ b/src/etc/inc/authgui.inc @@ -85,7 +85,7 @@ if (!$_SESSION['Post_Login']) { * Close session data to allow other scripts from same host to come in. * A session can be reactivated from calling session_start again */ -session_commit(); +session_write_close(); /* * determine if the user is allowed access to the requested page diff --git a/src/etc/inc/config.lib.inc b/src/etc/inc/config.lib.inc index 9badb5968..74a798c91 100644 --- a/src/etc/inc/config.lib.inc +++ b/src/etc/inc/config.lib.inc @@ -473,14 +473,14 @@ function write_config($desc = 'Unknown', $backup = true) if (!empty($_SESSION['Username']) && ($_SESSION['Username'] != 'root')) { $user = getUserEntry($_SESSION['Username']); if (is_array($user) && userHasPrivilege($user, "user-config-readonly")) { - session_commit(); + session_write_close(); return false; } } } if (!isset($argc)) { - session_commit(); + session_write_close(); } if ($backup) { diff --git a/src/www/firewall_virtual_ip.php b/src/www/firewall_virtual_ip.php index b60f03e4e..d141d3413 100644 --- a/src/www/firewall_virtual_ip.php +++ b/src/www/firewall_virtual_ip.php @@ -1,4 +1,5 @@ . @@ -28,7 +29,7 @@ POSSIBILITY OF SUCH DAMAGE. */ -require("guiconfig.inc"); +require_once("guiconfig.inc"); require_once("functions.inc"); require_once("filter.inc"); require_once("shaper.inc"); @@ -152,7 +153,7 @@ if ($_GET['act'] == "del") { header("Location: firewall_virtual_ip.php"); exit; } - session_commit(); + session_write_close(); // Special case since every proxyarp vip is handled by the same daemon. if ($a_vip[$_GET['id']]['mode'] == "proxyarp") { diff --git a/src/www/headjs.php b/src/www/headjs.php index 2e07ebc69..d0c7fa449 100644 --- a/src/www/headjs.php +++ b/src/www/headjs.php @@ -1,6 +1,8 @@ saving changes $config['system']['user'][$userindex[$_SESSION['Username']]]['password'] = crypt($_POST['passwordfld1'], '$6$'); local_user_set($config['system']['user'][$userindex[$_SESSION['Username']]]); - session_commit(); + session_write_close(); write_config(); @@ -66,7 +66,7 @@ foreach($config['system']['user'] as $user) if($user['name'] == $_SESSION['Username']) $islocal = true; -session_commit(); +session_write_close(); include("head.inc"); @@ -107,7 +107,7 @@ include("head.inc"); session_start(); ?> 's - +