mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 20:38:52 +00:00
Merge pull request #5071 from dsinn/ticket/15495
[ticket/15495] Use transaction in ACP move_forum
This commit is contained in:
commit
1cd8bbac0c
1 changed files with 4 additions and 0 deletions
|
@ -1431,6 +1431,8 @@ class acp_forums
|
||||||
return $errors;
|
return $errors;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$db->sql_transaction('begin');
|
||||||
|
|
||||||
$moved_forums = get_forum_branch($from_id, 'children', 'descending');
|
$moved_forums = get_forum_branch($from_id, 'children', 'descending');
|
||||||
$from_data = $moved_forums[0];
|
$from_data = $moved_forums[0];
|
||||||
$diff = count($moved_forums) * 2;
|
$diff = count($moved_forums) * 2;
|
||||||
|
@ -1502,6 +1504,8 @@ class acp_forums
|
||||||
WHERE " . $db->sql_in_set('forum_id', $moved_ids);
|
WHERE " . $db->sql_in_set('forum_id', $moved_ids);
|
||||||
$db->sql_query($sql);
|
$db->sql_query($sql);
|
||||||
|
|
||||||
|
$db->sql_transaction('commit');
|
||||||
|
|
||||||
return $errors;
|
return $errors;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue