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']) {
* 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
......
......@@ -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) {
......
<?php
/*
Copyright (C) 2014-2015 Deciso B.V.
Copyright (C) 2005 Bill Marquette <bill.marquette@gmail.com>.
......@@ -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") {
......
<?php
/*
Copyright (C) 2014-2015 Deciso B.V.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
......@@ -36,7 +38,7 @@ function getHeadJS() {
if (!session_id())
session_start();
$_SESSION['NO_AJAX'] == "True" ? $noajax = "var noAjaxOnSubmit = true;" : $noajax = "var noAjaxOnSubmit = false;";
session_commit();
session_write_close();
$headjs .= "
{$noajax}
......
<?php
/*
Copyright (C) 2014-2015 Deciso B.V.
Copyright (C) 2011 Scott Ullrich
......
<?php
/*
Copyright (C) 2014-2015 Deciso B.V.
Copyright (C) 2011 Ermal Luçi
......@@ -26,7 +27,6 @@
POSSIBILITY OF SUCH DAMAGE.
*/
require_once("certs.inc");
require_once("guiconfig.inc");
......@@ -49,7 +49,7 @@ if (isset($_POST['save'])) {
// all values are okay --> 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();
?>
<td colspan="2" valign="top" class="listtopic"><?=$_SESSION['Username']?>'s <?=gettext("Password"); ?></td>
<?php session_commit(); ?>
<?php session_write_close(); ?>
</tr>
<tr>
<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