mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
Merge pull request #5529 from 3D-I/ticket/15960
[ticket/15960] Add SQL transactions to functions_admin.php
This commit is contained in:
commit
27b0719174
1 changed files with 4 additions and 0 deletions
|
@ -3042,6 +3042,8 @@ function tidy_database()
|
||||||
}
|
}
|
||||||
$db->sql_freeresult($result);
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
|
$db->sql_transaction('begin');
|
||||||
|
|
||||||
// Delete those rows from the acl tables not having listed the forums above
|
// Delete those rows from the acl tables not having listed the forums above
|
||||||
$sql = 'DELETE FROM ' . ACL_GROUPS_TABLE . '
|
$sql = 'DELETE FROM ' . ACL_GROUPS_TABLE . '
|
||||||
WHERE ' . $db->sql_in_set('forum_id', $forum_ids, true);
|
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);
|
WHERE ' . $db->sql_in_set('forum_id', $forum_ids, true);
|
||||||
$db->sql_query($sql);
|
$db->sql_query($sql);
|
||||||
|
|
||||||
|
$db->sql_transaction('commit');
|
||||||
|
|
||||||
$config->set('database_last_gc', time(), false);
|
$config->set('database_last_gc', time(), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue