Commit 3ba3cba1 authored by Franco Fichtner's avatar Franco Fichtner

src: s/session_commit/session_write_close/g for consistency

parent 1f8264ac
...@@ -85,7 +85,7 @@ if (!$_SESSION['Post_Login']) { ...@@ -85,7 +85,7 @@ if (!$_SESSION['Post_Login']) {
* Close session data to allow other scripts from same host to come in. * Close session data to allow other scripts from same host to come in.
* A session can be reactivated from calling session_start again * 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 * determine if the user is allowed access to the requested page
......
...@@ -473,14 +473,14 @@ function write_config($desc = 'Unknown', $backup = true) ...@@ -473,14 +473,14 @@ function write_config($desc = 'Unknown', $backup = true)
if (!empty($_SESSION['Username']) && ($_SESSION['Username'] != 'root')) { if (!empty($_SESSION['Username']) && ($_SESSION['Username'] != 'root')) {
$user = getUserEntry($_SESSION['Username']); $user = getUserEntry($_SESSION['Username']);
if (is_array($user) && userHasPrivilege($user, "user-config-readonly")) { if (is_array($user) && userHasPrivilege($user, "user-config-readonly")) {
session_commit(); session_write_close();
return false; return false;
} }
} }
} }
if (!isset($argc)) { if (!isset($argc)) {
session_commit(); session_write_close();
} }
if ($backup) { if ($backup) {
......
<?php <?php
/* /*
Copyright (C) 2014-2015 Deciso B.V. Copyright (C) 2014-2015 Deciso B.V.
Copyright (C) 2005 Bill Marquette <bill.marquette@gmail.com>. Copyright (C) 2005 Bill Marquette <bill.marquette@gmail.com>.
...@@ -28,7 +29,7 @@ ...@@ -28,7 +29,7 @@
POSSIBILITY OF SUCH DAMAGE. POSSIBILITY OF SUCH DAMAGE.
*/ */
require("guiconfig.inc"); require_once("guiconfig.inc");
require_once("functions.inc"); require_once("functions.inc");
require_once("filter.inc"); require_once("filter.inc");
require_once("shaper.inc"); require_once("shaper.inc");
...@@ -152,7 +153,7 @@ if ($_GET['act'] == "del") { ...@@ -152,7 +153,7 @@ if ($_GET['act'] == "del") {
header("Location: firewall_virtual_ip.php"); header("Location: firewall_virtual_ip.php");
exit; exit;
} }
session_commit(); session_write_close();
// Special case since every proxyarp vip is handled by the same daemon. // Special case since every proxyarp vip is handled by the same daemon.
if ($a_vip[$_GET['id']]['mode'] == "proxyarp") { if ($a_vip[$_GET['id']]['mode'] == "proxyarp") {
......
<?php <?php
/* /*
Copyright (C) 2014-2015 Deciso B.V. Copyright (C) 2014-2015 Deciso B.V.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met: modification, are permitted provided that the following conditions are met:
...@@ -36,7 +38,7 @@ function getHeadJS() { ...@@ -36,7 +38,7 @@ function getHeadJS() {
if (!session_id()) if (!session_id())
session_start(); session_start();
$_SESSION['NO_AJAX'] == "True" ? $noajax = "var noAjaxOnSubmit = true;" : $noajax = "var noAjaxOnSubmit = false;"; $_SESSION['NO_AJAX'] == "True" ? $noajax = "var noAjaxOnSubmit = true;" : $noajax = "var noAjaxOnSubmit = false;";
session_commit(); session_write_close();
$headjs .= " $headjs .= "
{$noajax} {$noajax}
......
<?php <?php
/* /*
Copyright (C) 2014-2015 Deciso B.V. Copyright (C) 2014-2015 Deciso B.V.
Copyright (C) 2011 Scott Ullrich Copyright (C) 2011 Scott Ullrich
......
<?php <?php
/* /*
Copyright (C) 2014-2015 Deciso B.V. Copyright (C) 2014-2015 Deciso B.V.
Copyright (C) 2011 Ermal Luçi Copyright (C) 2011 Ermal Luçi
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met: modification, are permitted provided that the following conditions are met:
...@@ -26,7 +27,6 @@ ...@@ -26,7 +27,6 @@
POSSIBILITY OF SUCH DAMAGE. POSSIBILITY OF SUCH DAMAGE.
*/ */
require_once("certs.inc"); require_once("certs.inc");
require_once("guiconfig.inc"); require_once("guiconfig.inc");
...@@ -49,7 +49,7 @@ if (isset($_POST['save'])) { ...@@ -49,7 +49,7 @@ if (isset($_POST['save'])) {
// all values are okay --> saving changes // all values are okay --> saving changes
$config['system']['user'][$userindex[$_SESSION['Username']]]['password'] = crypt($_POST['passwordfld1'], '$6$'); $config['system']['user'][$userindex[$_SESSION['Username']]]['password'] = crypt($_POST['passwordfld1'], '$6$');
local_user_set($config['system']['user'][$userindex[$_SESSION['Username']]]); local_user_set($config['system']['user'][$userindex[$_SESSION['Username']]]);
session_commit(); session_write_close();
write_config(); write_config();
...@@ -66,7 +66,7 @@ foreach($config['system']['user'] as $user) ...@@ -66,7 +66,7 @@ foreach($config['system']['user'] as $user)
if($user['name'] == $_SESSION['Username']) if($user['name'] == $_SESSION['Username'])
$islocal = true; $islocal = true;
session_commit(); session_write_close();
include("head.inc"); include("head.inc");
...@@ -107,7 +107,7 @@ include("head.inc"); ...@@ -107,7 +107,7 @@ include("head.inc");
session_start(); session_start();
?> ?>
<td colspan="2" valign="top" class="listtopic"><?=$_SESSION['Username']?>'s <?=gettext("Password"); ?></td> <td colspan="2" valign="top" class="listtopic"><?=$_SESSION['Username']?>'s <?=gettext("Password"); ?></td>
<?php session_commit(); ?> <?php session_write_close(); ?>
</tr> </tr>
<tr> <tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Password"); ?></td> <td width="22%" valign="top" class="vncell"><?=gettext("Password"); ?></td>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment