mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[ticket/15960] Add SQL transactions to functions_admin.php
PHPBB3-15960
This commit is contained in:
parent
871875d9aa
commit
271db031ad
1 changed files with 4 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue