diff options
author | 3D-I <marktravai@gmail.com> | 2019-02-01 23:24:19 +0100 |
---|---|---|
committer | 3D-I <marktravai@gmail.com> | 2019-02-01 23:24:41 +0100 |
commit | 271db031adbb10317fcb3653201884cb9ec0b0d9 (patch) | |
tree | 36835262d4098279ed292b25cb7b4df108fc4ec3 /phpBB/includes/functions_admin.php | |
parent | 871875d9aa3d0b0a17a0eb1936323d5737a438f5 (diff) | |
download | forums-271db031adbb10317fcb3653201884cb9ec0b0d9.tar forums-271db031adbb10317fcb3653201884cb9ec0b0d9.tar.gz forums-271db031adbb10317fcb3653201884cb9ec0b0d9.tar.bz2 forums-271db031adbb10317fcb3653201884cb9ec0b0d9.tar.xz forums-271db031adbb10317fcb3653201884cb9ec0b0d9.zip |
[ticket/15960] Add SQL transactions to functions_admin.php
PHPBB3-15960
Diffstat (limited to 'phpBB/includes/functions_admin.php')
-rw-r--r-- | phpBB/includes/functions_admin.php | 4 |
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); } |