src: s/session_commit/session_write_close/g for consistency

This commit is contained in:
Franco Fichtner 2015-03-04 07:04:35 +01:00
parent 1f8264ac02
commit 3ba3cba107
6 changed files with 16 additions and 12 deletions

View File

@ -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

View File

@ -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) {

View File

@ -1,4 +1,5 @@
<?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") {

View File

@ -1,6 +1,8 @@
<?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}

View File

@ -1,4 +1,5 @@
<?php
/*
Copyright (C) 2014-2015 Deciso B.V.
Copyright (C) 2011 Scott Ullrich

View File

@ -1,8 +1,9 @@
<?php
/*
Copyright (C) 2014-2015 Deciso B.V.
Copyright (C) 2014-2015 Deciso B.V.
Copyright (C) 2011 Ermal Luçi
All rights reserved.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@ -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>