diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2009-08-11 13:35:15 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2009-08-11 13:35:15 +0000 |
commit | ff458a5b4e81c1f35a3341ad4646205e52c5b5da (patch) | |
tree | 9d6e315b8ac91d5afdb45c79602aea0231567e05 /phpBB/posting.php | |
parent | 9dc2095b52fbe27925ac995879a0b491ae3e5130 (diff) | |
download | forums-ff458a5b4e81c1f35a3341ad4646205e52c5b5da.tar forums-ff458a5b4e81c1f35a3341ad4646205e52c5b5da.tar.gz forums-ff458a5b4e81c1f35a3341ad4646205e52c5b5da.tar.bz2 forums-ff458a5b4e81c1f35a3341ad4646205e52c5b5da.tar.xz forums-ff458a5b4e81c1f35a3341ad4646205e52c5b5da.zip |
Update search index if only post subject changed. (Bug #49435)
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9955 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/posting.php')
-rw-r--r-- | phpBB/posting.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/phpBB/posting.php b/phpBB/posting.php index 919d92b27c..36c3df50d9 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -802,6 +802,9 @@ if ($submit || $preview || $refresh) // Check checksum ... don't re-parse message if the same $update_message = ($mode != 'edit' || $message_md5 != $post_data['post_checksum'] || $status_switch || strlen($post_data['bbcode_uid']) < BBCODE_UID_LEN) ? true : false; + // Also check if subject got updated... + $update_subject = $mode != 'edit' || ($post_data['post_subject_md5'] && $post_data['post_subject_md5'] != md5($post_data['post_subject'])); + // Parse message if ($update_message) { @@ -1114,7 +1117,8 @@ if ($submit || $preview || $refresh) $data['topic_replies'] = $post_data['topic_replies']; } - $redirect_url = submit_post($mode, $post_data['post_subject'], $post_data['username'], $post_data['topic_type'], $poll, $data, $update_message); + // $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); if ($config['enable_post_confirm'] && !$user->data['is_registered'] && in_array($mode, array('quote', 'post', 'reply'))) { |