From 8186aed796eaa70439b28eb8cdde9a3e3d8f8fc6 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Mon, 20 May 2019 18:06:07 +0200 Subject: [PATCH] removed parallel editing check --- lam/lib/modules.inc | 11 +---------- lam/templates/account/edit.php | 6 +++--- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/lam/lib/modules.inc b/lam/lib/modules.inc index d0e8729a..bcce009f 100644 --- a/lam/lib/modules.inc +++ b/lam/lib/modules.inc @@ -745,9 +745,8 @@ class accountContainer { * * @param ConfiguredType $type account type * @param string $base key in $_SESSION where this object is saved - * @param integer $randomID random ID to avoid parallel editing (default: null) */ - function __construct($type, $base, $randomID = null) { + function __construct($type, $base) { if (!($type instanceof ConfiguredType)) { trigger_error('Argument of accountContainer must be ConfiguredType.', E_USER_ERROR); } @@ -760,7 +759,6 @@ class accountContainer { $this->current_page=0; $this->subpage='attributes'; $this->isNewAccount = false; - $this->randomID = $randomID; return 0; } @@ -824,8 +822,6 @@ class accountContainer { /** send password via mail to this alternate address */ private $sendPasswordViaMailAlternateAddress = null; - /** random ID number to avoid parallel editing of accounts in multiple browser tabs */ - private $randomID = null; /** * Returns the account module with the given class name @@ -865,10 +861,6 @@ class accountContainer { * It prints the HTML code of each account page. */ function continue_main() { - if (!empty($_POST['account_randomID']) && ($this->randomID != $_POST['account_randomID'])) { - metaRefresh("../lists/list.php?type=" . $this->type->getId() . '&accountEditInvalidID=true'); - exit(); - } $oldPage = $this->current_page; $oldSubpage = $this->subpage; $result = array(); @@ -1378,7 +1370,6 @@ class accountContainer { }); '; echo "
\n"; - echo ''; echo ''; } diff --git a/lam/templates/account/edit.php b/lam/templates/account/edit.php index c038d499..0c5b4a01 100644 --- a/lam/templates/account/edit.php +++ b/lam/templates/account/edit.php @@ -3,7 +3,7 @@ This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) Copyright (C) 2003 - 2006 Tilo Lutz - 2005 - 2018 Roland Gruber + 2005 - 2019 Roland Gruber This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -80,7 +80,7 @@ if (isset($_GET['DN'])) { logNewMessage(LOG_ERR, 'User tried to access entry of type ' . $type->getId() . ' outside suffix ' . $suffix); die(); } - $_SESSION['account'] = new accountContainer($type, 'account', getRandomNumber()); + $_SESSION['account'] = new accountContainer($type, 'account'); $result = $_SESSION['account']->load_account($DN); if (sizeof($result) > 0) { include __DIR__ . '/../../lib/adminHeader.inc'; @@ -102,7 +102,7 @@ else if (count($_POST) == 0) { logNewMessage(LOG_ERR, 'User tried to create entry of forbidden account type: ' . $type->getId()); die(); } - $_SESSION['account'] = new accountContainer($type, 'account', getRandomNumber()); + $_SESSION['account'] = new accountContainer($type, 'account'); $_SESSION['account']->new_account(); }