mirror of
https://github.com/phpbb/phpbb.git
synced 2025-03-21 08:00:46 +01:00
[ticket/15495] Use transaction in ACP move_forum
Should prevent the forums table from getting messed up if an error or concurrent execution happens. PHPBB3-15495
This commit is contained in:
parent
0ff5f9fa0e
commit
84ccb3aded
@ -1431,6 +1431,8 @@ class acp_forums
|
||||
return $errors;
|
||||
}
|
||||
|
||||
$db->sql_transaction('begin');
|
||||
|
||||
$moved_forums = get_forum_branch($from_id, 'children', 'descending');
|
||||
$from_data = $moved_forums[0];
|
||||
$diff = sizeof($moved_forums) * 2;
|
||||
@ -1502,6 +1504,8 @@ class acp_forums
|
||||
WHERE " . $db->sql_in_set('forum_id', $moved_ids);
|
||||
$db->sql_query($sql);
|
||||
|
||||
$db->sql_transaction('commit');
|
||||
|
||||
return $errors;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user