From: Meik S. <acy...@ph...> - 2009-08-11 13:54:59
|
Author: acydburn Date: Tue Aug 11 14:35:15 2009 New Revision: 9955 Log: Update search index if only post subject changed. (Bug #49435) Modified: branches/phpBB-3_0_0/phpBB/docs/CHANGELOG.html branches/phpBB-3_0_0/phpBB/posting.php Modified: branches/phpBB-3_0_0/phpBB/docs/CHANGELOG.html ============================================================================== *** branches/phpBB-3_0_0/phpBB/docs/CHANGELOG.html (original) --- branches/phpBB-3_0_0/phpBB/docs/CHANGELOG.html Tue Aug 11 14:35:15 2009 *************** *** 191,196 **** --- 191,197 ---- <li>[Fix] Fix general error while registration, through undefined variable $config in validate_referer (Bug #49035 - Patch by wjvriend)</li> <li>[Fix] Correctly extract column default value when exporting PostgreSQL tables. (Bug #48955)</li> <li>[Fix] Allow updater to work correctly with PHP filename extensions other than ".php". (Bugs #15809, #49215)</li> + <li>[Fix] Update search index if only post subject changed. (Bug #49435)</li> <li>[Change] submit_post() now accepts force_approved_state key passed to $data to indicate new posts being approved (true) or unapproved (false).</li> <li>[Change] Change the data format of the default file ACM to be more secure from tampering and have better performance.</li> <li>[Change] Add index on log_time to the log table to prevent slowdown on boards with many log entries. (Bug #44665 - Patch by bantu)</li> Modified: branches/phpBB-3_0_0/phpBB/posting.php ============================================================================== *** branches/phpBB-3_0_0/phpBB/posting.php (original) --- branches/phpBB-3_0_0/phpBB/posting.php Tue Aug 11 14:35:15 2009 *************** *** 802,807 **** --- 802,810 ---- // 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,1120 **** $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); if ($config['enable_post_confirm'] && !$user->data['is_registered'] && in_array($mode, array('quote', 'post', 'reply'))) { --- 1117,1124 ---- $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); if ($config['enable_post_confirm'] && !$user->data['is_registered'] && in_array($mode, array('quote', 'post', 'reply'))) { |