aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2009-08-12 09:22:04 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2009-08-12 09:22:04 +0000
commit5dd85e232355432f87156270236901df33232721 (patch)
treec28fdf47e4dd56b2984cb228d6cd83d6fa27a342
parentdedddfabedf357cda8606a6bc6c49ac48028bc07 (diff)
downloadforums-5dd85e232355432f87156270236901df33232721.tar
forums-5dd85e232355432f87156270236901df33232721.tar.gz
forums-5dd85e232355432f87156270236901df33232721.tar.bz2
forums-5dd85e232355432f87156270236901df33232721.tar.xz
forums-5dd85e232355432f87156270236901df33232721.zip
Fix r9955 for Bug #49435
(Since $update_message was true in submit_post() the non-parsed text had been entered into the db [because $update_message was false before]) git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9959 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r--phpBB/includes/functions_posting.php5
-rw-r--r--phpBB/posting.php4
2 files changed, 5 insertions, 4 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index 1385934c0e..4cf6b7010d 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -1621,8 +1621,9 @@ function delete_post($forum_id, $topic_id, $post_id, &$data)
/**
* Submit Post
+* @todo Split up and create lightweight, simple API for this.
*/
-function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $update_message = true)
+function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $update_message = true, $update_search_index = true)
{
global $db, $auth, $user, $config, $phpEx, $template, $phpbb_root_path;
@@ -2487,7 +2488,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
}
// Index message contents
- if ($update_message && $data['enable_indexing'])
+ if ($update_search_index && $data['enable_indexing'])
{
// Select the search method and do some additional checks to ensure it can actually be utilised
$search_type = basename($config['search_type']);
diff --git a/phpBB/posting.php b/phpBB/posting.php
index 36c3df50d9..05fabaca7c 100644
--- a/phpBB/posting.php
+++ b/phpBB/posting.php
@@ -1117,8 +1117,8 @@ if ($submit || $preview || $refresh)
$data['topic_replies'] = $post_data['topic_replies'];
}
- // $update_message indicates two things: 1) update post_text in table 2) update search index
- $redirect_url = submit_post($mode, $post_data['post_subject'], $post_data['username'], $post_data['topic_type'], $poll, $data, $update_message || $update_subject);
+ // The last parameter tells submit_post if search indexer has to be run
+ $redirect_url = submit_post($mode, $post_data['post_subject'], $post_data['username'], $post_data['topic_type'], $poll, $data, $update_message, ($update_message || $update_subject) ? true : false);
if ($config['enable_post_confirm'] && !$user->data['is_registered'] && in_array($mode, array('quote', 'post', 'reply')))
{