From: Meik S. <acy...@ph...> - 2009-08-12 09:22:50
|
Author: acydburn Date: Wed Aug 12 10:22:04 2009 New Revision: 9959 Log: 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]) Modified: branches/phpBB-3_0_0/phpBB/includes/functions_posting.php branches/phpBB-3_0_0/phpBB/posting.php Modified: branches/phpBB-3_0_0/phpBB/includes/functions_posting.php ============================================================================== *** branches/phpBB-3_0_0/phpBB/includes/functions_posting.php (original) --- branches/phpBB-3_0_0/phpBB/includes/functions_posting.php Wed Aug 12 10:22:04 2009 *************** *** 1621,1628 **** /** * Submit Post */ ! function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $update_message = true) { global $db, $auth, $user, $config, $phpEx, $template, $phpbb_root_path; --- 1621,1629 ---- /** * 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, $update_search_index = true) { global $db, $auth, $user, $config, $phpEx, $template, $phpbb_root_path; *************** *** 2487,2493 **** } // Index message contents ! if ($update_message && $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']); --- 2488,2494 ---- } // Index message contents ! 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']); 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 Wed Aug 12 10:22:04 2009 *************** *** 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'))) { --- 1117,1124 ---- $data['topic_replies'] = $post_data['topic_replies']; } ! // 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'))) { |