aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_posting.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2007-05-05 10:22:24 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2007-05-05 10:22:24 +0000
commita5704a0b01b2f549aad0c1722ae3b136a9c55f1e (patch)
tree44092e3287dc4f91d494073f541675f7f4475412 /phpBB/includes/functions_posting.php
parenteee1dedc13627283dfc1cfc5aa00f769fa061df7 (diff)
downloadforums-a5704a0b01b2f549aad0c1722ae3b136a9c55f1e.tar
forums-a5704a0b01b2f549aad0c1722ae3b136a9c55f1e.tar.gz
forums-a5704a0b01b2f549aad0c1722ae3b136a9c55f1e.tar.bz2
forums-a5704a0b01b2f549aad0c1722ae3b136a9c55f1e.tar.xz
forums-a5704a0b01b2f549aad0c1722ae3b136a9c55f1e.zip
Better support for nested transactions...
git-svn-id: file:///svn/phpbb/trunk@7469 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_posting.php')
-rw-r--r--phpBB/includes/functions_posting.php12
1 files changed, 4 insertions, 8 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index 8613c10651..f67384b80e 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -1377,8 +1377,6 @@ function delete_post($forum_id, $topic_id, $post_id, &$data)
}
}
- $db->sql_transaction('commit');
-
// Adjust posted info for this user by looking for a post by him/her within this topic...
if ($post_mode != 'delete_topic' && $config['load_db_track'] && $data['poster_id'] != ANONYMOUS)
{
@@ -1400,6 +1398,8 @@ function delete_post($forum_id, $topic_id, $post_id, &$data)
}
}
+ $db->sql_transaction('commit');
+
if ($data['post_reported'] && ($post_mode != 'delete_topic'))
{
sync('topic_reported', 'topic_id', array($topic_id));
@@ -1871,8 +1871,6 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
}
}
- $db->sql_transaction('commit');
-
if ($post_mode == 'post' || $post_mode == 'reply' || $post_mode == 'edit_last_post' || $post_mode == 'edit_topic')
{
if ($topic_type != POST_GLOBAL)
@@ -1924,8 +1922,6 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
}
// Update forum stats
- $db->sql_transaction('begin');
-
$where_sql = array(POSTS_TABLE => 'post_id = ' . $data['post_id'], TOPICS_TABLE => 'topic_id = ' . $data['topic_id'], FORUMS_TABLE => 'forum_id = ' . $data['forum_id'], USERS_TABLE => 'user_id = ' . $user->data['user_id']);
foreach ($sql_data as $table => $update_ary)
@@ -1968,8 +1964,6 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
$search->index($mode, $data['post_id'], $data['message'], $subject, $poster_id, ($topic_type == POST_GLOBAL) ? 0 : $data['forum_id']);
}
- $db->sql_transaction('commit');
-
// Delete draft if post was loaded...
$draft_id = request_var('draft_loaded', 0);
if ($draft_id)
@@ -1998,6 +1992,8 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
}
}
+ $db->sql_transaction('commit');
+
if ($mode == 'post' || $mode == 'reply' || $mode == 'quote')
{
// Mark this topic as posted to