From 627a2effc119e642567ae3b7942f89189bb9f473 Mon Sep 17 00:00:00 2001 From: nanosimbiot Date: Mon, 25 Jul 2011 21:05:00 +0000 Subject: [PATCH] r152 git-svn-id: https://torrentpier2.googlecode.com/svn/trunk@152 a8ac35ab-4ca4-ca47-4c2d-a49a94f06293 --- upload/includes/functions_post.php | 6 +++--- upload/viewtopic.php | 8 +------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/upload/includes/functions_post.php b/upload/includes/functions_post.php index a6cfb65d4..e1362ca1d 100644 --- a/upload/includes/functions_post.php +++ b/upload/includes/functions_post.php @@ -219,7 +219,7 @@ function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_ $post_id = DB()->sql_nextid(); } - $sql = ($mode != 'editpost') ? "INSERT INTO " . BB_POSTS_TEXT . " (post_id, post_subject, post_text) VALUES ($post_id, '$post_subject', '$post_message')" : "UPDATE " . BB_POSTS_TEXT . " SET post_text = '$post_message', post_subject = '$post_subject' WHERE post_id = $post_id"; + $sql = ($mode != 'editpost') ? "INSERT INTO " . BB_POSTS_TEXT . " (post_id, post_text) VALUES ($post_id, '$post_message')" : "UPDATE " . BB_POSTS_TEXT . " SET post_text = '$post_message' WHERE post_id = $post_id"; if (!DB()->sql_query($sql)) { message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql); @@ -721,8 +721,8 @@ function insert_post ($mode, $topic_id, $forum_id = '', $old_forum_id = '', $new $post_id = DB()->sql_nextid(); $post_text = DB()->escape($post_text); - $post_text_columns = 'post_id, post_subject, post_text'; - $post_text_values = "$post_id, '$post_subject', '$post_text'"; + $post_text_columns = 'post_id, post_text'; + $post_text_values = "$post_id, '$post_text'"; DB()->query("INSERT INTO ". BB_POSTS_TEXT ." ($post_text_columns) VALUES ($post_text_values)"); } diff --git a/upload/viewtopic.php b/upload/viewtopic.php index b5ebfaead..4fb3e1849 100644 --- a/upload/viewtopic.php +++ b/upload/viewtopic.php @@ -375,8 +375,7 @@ $sql = " u.user_avatar, u.user_avatar_type, u.user_opt, p.*, - h.post_html, IF(h.post_html IS NULL, pt.post_text, NULL) AS post_text, - pt.post_subject + h.post_html, IF(h.post_html IS NULL, pt.post_text, NULL) AS post_text FROM ". BB_POSTS ." p LEFT JOIN ". BB_USERS ." u ON(u.user_id = p.poster_id) LEFT JOIN ". BB_POSTS_TEXT ." pt ON(pt.post_id = p.post_id) @@ -857,8 +856,6 @@ for($i = 0; $i < $total_posts; $i++) // // Parse message and sig // - $post_subject = ( $postrow[$i]['post_subject'] != '' ) ? $postrow[$i]['post_subject'] : ''; - $message = get_parsed_post($postrow[$i]); $user_sig = ($bb_cfg['allow_sig'] && !$user->opt_js['h_sig'] && $postrow[$i]['user_sig']) ? $postrow[$i]['user_sig'] : ''; @@ -875,8 +872,6 @@ for($i = 0; $i < $total_posts; $i++) // if (count($orig_word)) { - $post_subject = preg_replace($orig_word, $replacement_word, $post_subject); - if ($user_sig) { $user_sig = str_replace('\"', '"', substr(@preg_replace('#(\>(((?>([^><]+|(?R)))*)\<))#se', "@preg_replace(\$orig_word, \$replacement_word, '\\0')", '>' . $user_sig . '<'), 1, -1)); @@ -971,7 +966,6 @@ for($i = 0; $i < $total_posts; $i++) 'POSTER_AVATAR' => $poster_avatar, 'POST_NUMBER' => ($i + $start + 1), 'POST_DATE' => $post_date, - 'POST_SUBJECT' => $post_subject, 'MESSAGE' => $message, 'SIGNATURE' => $user_sig, 'EDITED_MESSAGE' => $l_edited_by,