diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index 3e5757aa70..f87e0439f0 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -191,6 +191,7 @@
  • [Fix] Fix general error while registration, through undefined variable $config in validate_referer (Bug #49035 - Patch by wjvriend)
  • [Fix] Correctly extract column default value when exporting PostgreSQL tables. (Bug #48955)
  • [Fix] Allow updater to work correctly with PHP filename extensions other than ".php". (Bugs #15809, #49215)
  • +
  • [Fix] Update search index if only post subject changed. (Bug #49435)
  • [Change] submit_post() now accepts force_approved_state key passed to $data to indicate new posts being approved (true) or unapproved (false).
  • [Change] Change the data format of the default file ACM to be more secure from tampering and have better performance.
  • [Change] Add index on log_time to the log table to prevent slowdown on boards with many log entries. (Bug #44665 - Patch by bantu)
  • 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'))) {