1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-06 16:56:44 +02:00

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
This commit is contained in:
Meik Sievertsen
2009-08-11 13:35:15 +00:00
parent 9dc2095b52
commit ff458a5b4e
2 changed files with 6 additions and 1 deletions

View File

@@ -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')))
{