aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_admin.php
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2019-02-11 07:58:46 +0100
committerMarc Alexander <admin@m-a-styles.de>2019-02-11 07:58:46 +0100
commit27b07191742417d3b0e3ede32f07ff3de8fe34a0 (patch)
tree6baaebc8b6d1c07128493031c10da7db68871879 /phpBB/includes/functions_admin.php
parentab16595323b5dab4a0bbeafcca11b713149dfbdf (diff)
parent271db031adbb10317fcb3653201884cb9ec0b0d9 (diff)
downloadforums-27b07191742417d3b0e3ede32f07ff3de8fe34a0.tar
forums-27b07191742417d3b0e3ede32f07ff3de8fe34a0.tar.gz
forums-27b07191742417d3b0e3ede32f07ff3de8fe34a0.tar.bz2
forums-27b07191742417d3b0e3ede32f07ff3de8fe34a0.tar.xz
forums-27b07191742417d3b0e3ede32f07ff3de8fe34a0.zip
Merge pull request #5529 from 3D-I/ticket/15960
[ticket/15960] Add SQL transactions to functions_admin.php
Diffstat (limited to 'phpBB/includes/functions_admin.php')
-rw-r--r--phpBB/includes/functions_admin.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php
index 2fb83770fe..c19d48b0be 100644
--- a/phpBB/includes/functions_admin.php
+++ b/phpBB/includes/functions_admin.php
@@ -3042,6 +3042,8 @@ function tidy_database()
}
$db->sql_freeresult($result);
+ $db->sql_transaction('begin');
+
// Delete those rows from the acl tables not having listed the forums above
$sql = 'DELETE FROM ' . ACL_GROUPS_TABLE . '
WHERE ' . $db->sql_in_set('forum_id', $forum_ids, true);
@@ -3051,6 +3053,8 @@ function tidy_database()
WHERE ' . $db->sql_in_set('forum_id', $forum_ids, true);
$db->sql_query($sql);
+ $db->sql_transaction('commit');
+
$config->set('database_last_gc', time(), false);
}