mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
Fix sig bug #495562 and prepare club for next person who says "fix it quick" ... :)
git-svn-id: file:///svn/phpbb/trunk@1649 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
09d2de2b38
commit
bd5f308f6b
1 changed files with 19 additions and 16 deletions
|
@ -934,7 +934,7 @@ for($i = 0; $i < $total_posts; $i++)
|
||||||
$message = $postrow[$i]['post_text'];
|
$message = $postrow[$i]['post_text'];
|
||||||
$bbcode_uid = $postrow[$i]['bbcode_uid'];
|
$bbcode_uid = $postrow[$i]['bbcode_uid'];
|
||||||
|
|
||||||
$user_sig = $postrow[$i]['user_sig'];
|
$user_sig = ( $postrow[$i]['enable_sig'] && $postrow[$i]['user_sig'] != "" ) ? $postrow[$i]['user_sig'] : "";
|
||||||
$user_sig_bbcode_uid = $postrow[$i]['user_sig_bbcode_uid'];
|
$user_sig_bbcode_uid = $postrow[$i]['user_sig_bbcode_uid'];
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -949,7 +949,7 @@ for($i = 0; $i < $total_posts; $i++)
|
||||||
//
|
//
|
||||||
if( !$board_config['allow_html'] )
|
if( !$board_config['allow_html'] )
|
||||||
{
|
{
|
||||||
if( $user_sig != "" && $postrow[$i]['enable_sig'] && $userdata['user_allowhtml'] )
|
if( $user_sig != "" && $userdata['user_allowhtml'] )
|
||||||
{
|
{
|
||||||
$user_sig = preg_replace("#(<)([\/]?.*?)(>)#is", "<\\2>", $user_sig);
|
$user_sig = preg_replace("#(<)([\/]?.*?)(>)#is", "<\\2>", $user_sig);
|
||||||
}
|
}
|
||||||
|
@ -965,7 +965,7 @@ for($i = 0; $i < $total_posts; $i++)
|
||||||
//
|
//
|
||||||
if( $board_config['allow_bbcode'] )
|
if( $board_config['allow_bbcode'] )
|
||||||
{
|
{
|
||||||
if( $user_sig != "" && $postrow[$i]['enable_sig'] && $user_sig_bbcode_uid != "" )
|
if( $user_sig != "" && $user_sig_bbcode_uid != "" )
|
||||||
{
|
{
|
||||||
$user_sig = ( $board_config['allow_bbcode'] ) ? bbencode_second_pass($user_sig, $user_sig_bbcode_uid) : preg_replace("/\:[0-9a-z\:]+\]/si", "]", $user_sig);
|
$user_sig = ( $board_config['allow_bbcode'] ) ? bbencode_second_pass($user_sig, $user_sig_bbcode_uid) : preg_replace("/\:[0-9a-z\:]+\]/si", "]", $user_sig);
|
||||||
}
|
}
|
||||||
|
@ -976,8 +976,11 @@ for($i = 0; $i < $total_posts; $i++)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( $user_sig != "" )
|
||||||
|
{
|
||||||
|
$user_sig = make_clickable($user_sig);
|
||||||
|
}
|
||||||
$message = make_clickable($message);
|
$message = make_clickable($message);
|
||||||
$user_sig = make_clickable($user_sig);
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Highlight active words (primarily for search)
|
// Highlight active words (primarily for search)
|
||||||
|
@ -992,13 +995,13 @@ for($i = 0; $i < $total_posts; $i++)
|
||||||
//
|
//
|
||||||
if( count($orig_word) )
|
if( count($orig_word) )
|
||||||
{
|
{
|
||||||
$post_subject = preg_replace($orig_word, $replacement_word, $post_subject);
|
if( $user_sig != "" )
|
||||||
$message = preg_replace($orig_word, $replacement_word, $message);
|
|
||||||
|
|
||||||
if( $user_sig != "" && $postrow[$i]['enable_sig'] )
|
|
||||||
{
|
{
|
||||||
$user_sig = preg_replace($orig_word, $replacement_word, $user_sig);
|
$user_sig = preg_replace($orig_word, $replacement_word, $user_sig);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$post_subject = preg_replace($orig_word, $replacement_word, $post_subject);
|
||||||
|
$message = preg_replace($orig_word, $replacement_word, $message);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -1006,28 +1009,28 @@ for($i = 0; $i < $total_posts; $i++)
|
||||||
//
|
//
|
||||||
if( $board_config['allow_smilies'] )
|
if( $board_config['allow_smilies'] )
|
||||||
{
|
{
|
||||||
|
if( $postrow[$i]['user_allowsmile'] && $user_sig != "" )
|
||||||
|
{
|
||||||
|
$user_sig = smilies_pass($user_sig);
|
||||||
|
}
|
||||||
|
|
||||||
if( $postrow[$i]['enable_smilies'] )
|
if( $postrow[$i]['enable_smilies'] )
|
||||||
{
|
{
|
||||||
$message = smilies_pass($message);
|
$message = smilies_pass($message);
|
||||||
}
|
}
|
||||||
|
|
||||||
if( $postrow[$i]['user_allowsmile'] && $user_sig != "" && $postrow[$i]['enable_sig'] )
|
|
||||||
{
|
|
||||||
$user_sig = smilies_pass($user_sig);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Replace newlines (we use this rather than nl2br because
|
// Replace newlines (we use this rather than nl2br because
|
||||||
// till recently it wasn't XHTML compliant)
|
// till recently it wasn't XHTML compliant)
|
||||||
//
|
//
|
||||||
$message = str_replace("\n", "\n<br />\n", $message);
|
if( $user_sig != "" )
|
||||||
|
|
||||||
if( $user_sig != "" && $postrow[$i]['enable_sig'] )
|
|
||||||
{
|
{
|
||||||
$user_sig = "<br />_________________<br />" . str_replace("\n", "\n<br />", $user_sig);
|
$user_sig = "<br />_________________<br />" . str_replace("\n", "\n<br />", $user_sig);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$message = str_replace("\n", "\n<br />\n", $message);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Editing information
|
// Editing information
|
||||||
//
|
//
|
||||||
|
|
Loading…
Add table
Reference in a new issue