aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorDaniel Sinn <daniel.p.sinn@gmail.com>2018-01-03 16:18:14 -0500
committerDaniel Sinn <daniel.p.sinn@gmail.com>2018-01-03 16:18:14 -0500
commit84ccb3aded7fe303fb176b87f7b976288dcedf35 (patch)
tree19cae6af8fd5bfd6e54aa509d327a6bbb982a523 /phpBB/includes
parent0ff5f9fa0edf9ac3125cc4e871609a90cee1cfac (diff)
downloadforums-84ccb3aded7fe303fb176b87f7b976288dcedf35.tar
forums-84ccb3aded7fe303fb176b87f7b976288dcedf35.tar.gz
forums-84ccb3aded7fe303fb176b87f7b976288dcedf35.tar.bz2
forums-84ccb3aded7fe303fb176b87f7b976288dcedf35.tar.xz
forums-84ccb3aded7fe303fb176b87f7b976288dcedf35.zip
[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
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/acp/acp_forums.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/phpBB/includes/acp/acp_forums.php b/phpBB/includes/acp/acp_forums.php
index 66bb630241..6c749bb7bd 100644
--- a/phpBB/includes/acp/acp_forums.php
+++ b/phpBB/includes/acp/acp_forums.php
@@ -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;
}