From 278bd972c1880a3a533c9992e3856823776ad86f Mon Sep 17 00:00:00 2001 From: skeeter Date: Fri, 30 Mar 2001 04:21:10 +0000 Subject: [PATCH] Delete now locks the accounts table. --- phpgwapi/inc/class.accounts_ldap.inc.php | 3 +++ phpgwapi/inc/class.accounts_sql.inc.php | 3 +++ 2 files changed, 6 insertions(+) diff --git a/phpgwapi/inc/class.accounts_ldap.inc.php b/phpgwapi/inc/class.accounts_ldap.inc.php index 12d4709749..ca6047d005 100644 --- a/phpgwapi/inc/class.accounts_ldap.inc.php +++ b/phpgwapi/inc/class.accounts_ldap.inc.php @@ -146,7 +146,10 @@ } // Do this last since we are depending upon this record to get the account_lid above + $tables_array = Array('phpgw_accounts'); + $this->db->lock($tables_array); $this->db->query('DELETE FROM phpgw_accounts WHERE account_id='.$account_id); + $this->db->unlock(); } function get_list($_type='both', $start = '',$sort = '', $order = '', $query = '', $offset = '') diff --git a/phpgwapi/inc/class.accounts_sql.inc.php b/phpgwapi/inc/class.accounts_sql.inc.php index c7e71475a0..c9ede7adea 100644 --- a/phpgwapi/inc/class.accounts_sql.inc.php +++ b/phpgwapi/inc/class.accounts_sql.inc.php @@ -72,7 +72,10 @@ $account_id = get_account_id($accountid); // Do this last since we are depending upon this record to get the account_lid above + $tables_array = Array('phpgw_accounts'); + $this->db->lock($tables_array); $this->db->query('DELETE FROM phpgw_accounts WHERE account_id='.$account_id); + $this->db->unlock(); }