Merge pull request #5529 from 3D-I/ticket/15960

[ticket/15960] Add SQL transactions to functions_admin.php
This commit is contained in:
Marc Alexander 2019-02-11 07:58:46 +01:00
commit 27b0719174

View file

@ -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);
}