|
From: Paul S. O. <ps...@us...> - 2001-12-20 22:02:41
|
Update of /cvsroot/phpbb/phpBB2
In directory usw-pr-cvs1:/tmp/cvs-serv12070
Modified Files:
viewtopic.php
Log Message:
Fix sig bug #495562 and prepare club for next person who says "fix it quick" ... :)
Index: viewtopic.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/viewtopic.php,v
retrieving revision 1.156
retrieving revision 1.157
diff -C2 -r1.156 -r1.157
*** viewtopic.php 2001/12/20 19:00:08 1.156
--- viewtopic.php 2001/12/20 22:02:38 1.157
***************
*** 935,939 ****
$bbcode_uid = $postrow[$i]['bbcode_uid'];
! $user_sig = $postrow[$i]['user_sig'];
$user_sig_bbcode_uid = $postrow[$i]['user_sig_bbcode_uid'];
--- 935,939 ----
$bbcode_uid = $postrow[$i]['bbcode_uid'];
! $user_sig = ( $postrow[$i]['enable_sig'] && $postrow[$i]['user_sig'] != "" ) ? $postrow[$i]['user_sig'] : "";
$user_sig_bbcode_uid = $postrow[$i]['user_sig_bbcode_uid'];
***************
*** 950,954 ****
if( !$board_config['allow_html'] )
{
! if( $user_sig != "" && $postrow[$i]['enable_sig'] && $userdata['user_allowhtml'] )
{
$user_sig = preg_replace("#(<)([\/]?.*?)(>)#is", "<\\2>", $user_sig);
--- 950,954 ----
if( !$board_config['allow_html'] )
{
! if( $user_sig != "" && $userdata['user_allowhtml'] )
{
$user_sig = preg_replace("#(<)([\/]?.*?)(>)#is", "<\\2>", $user_sig);
***************
*** 966,970 ****
if( $board_config['allow_bbcode'] )
{
! if( $user_sig != "" && $postrow[$i]['enable_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);
--- 966,970 ----
if( $board_config['allow_bbcode'] )
{
! 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);
***************
*** 977,982 ****
}
$message = make_clickable($message);
- $user_sig = make_clickable($user_sig);
//
--- 977,985 ----
}
+ if( $user_sig != "" )
+ {
+ $user_sig = make_clickable($user_sig);
+ }
$message = make_clickable($message);
//
***************
*** 993,1003 ****
if( count($orig_word) )
{
! $post_subject = preg_replace($orig_word, $replacement_word, $post_subject);
! $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);
}
}
--- 996,1006 ----
if( count($orig_word) )
{
! if( $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);
}
***************
*** 1007,1018 ****
if( $board_config['allow_smilies'] )
{
! if( $postrow[$i]['enable_smilies'] )
{
! $message = smilies_pass($message);
}
! if( $postrow[$i]['user_allowsmile'] && $user_sig != "" && $postrow[$i]['enable_sig'] )
{
! $user_sig = smilies_pass($user_sig);
}
}
--- 1010,1021 ----
if( $board_config['allow_smilies'] )
{
! if( $postrow[$i]['user_allowsmile'] && $user_sig != "" )
{
! $user_sig = smilies_pass($user_sig);
}
! if( $postrow[$i]['enable_smilies'] )
{
! $message = smilies_pass($message);
}
}
***************
*** 1022,1031 ****
// till recently it wasn't XHTML compliant)
//
! $message = str_replace("\n", "\n<br />\n", $message);
!
! if( $user_sig != "" && $postrow[$i]['enable_sig'] )
{
$user_sig = "<br />_________________<br />" . str_replace("\n", "\n<br />", $user_sig);
}
//
--- 1025,1034 ----
// till recently it wasn't XHTML compliant)
//
! if( $user_sig != "" )
{
$user_sig = "<br />_________________<br />" . str_replace("\n", "\n<br />", $user_sig);
}
+
+ $message = str_replace("\n", "\n<br />\n", $message);
//
|