mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 22:03:49 -07:00
r152
git-svn-id: https://torrentpier2.googlecode.com/svn/trunk@152 a8ac35ab-4ca4-ca47-4c2d-a49a94f06293
This commit is contained in:
parent
3187ecea03
commit
627a2effc1
2 changed files with 4 additions and 10 deletions
|
@ -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)");
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue