From c74d2538ec68fa1c6f3da6d26e31a09f2045557b Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Sat, 21 Feb 2004 12:47:35 +0000 Subject: - put consoring and smilie processing into functions (we use them all over the place) for better changing and consistency. - changed docs/AUTHORS to reflect the recent code re-use in functions_messenger.php - pleasing the users a little bit more by using table constants. :D - login box if "mode" is not allowed -> posting (thought about trigger_error integration, but we do not need this that often). git-svn-id: file:///svn/phpbb/trunk@4836 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions_posting.php | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'phpBB/includes/functions_posting.php') diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 9a0aa1bd48..2383558100 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -91,22 +91,21 @@ function generate_smilies($mode, $forum_id) // Format text to be displayed - from viewtopic.php - centralizing this would be nice ;) function format_display(&$message, &$signature, $uid, $siguid, $html, $bbcode, $url, $smilies, $sig) { - global $auth, $forum_id, $config, $censors, $user, $bbcode, $phpbb_root_path; + global $auth, $forum_id, $config, $user, $bbcode, $phpbb_root_path; // Second parse bbcode here $bbcode->bbcode_second_pass($message, $uid); // If we allow users to disable display of emoticons we'll need an appropriate // check and preg_replace here - $message = (!$smilies || !$config['allow_smilies']) ? preg_replace('#(((?>([^><]+|(?R)))*)\<))#se', "preg_replace(\$censors['match'], \$censors['replace'], '\\0')", '>' . $message . '<'), 1, -1)); - } - - $message = str_replace("\n", '
', $message); + }*/ + $message = str_replace("\n", '
', censor_text($message)); // Signature if ($sig && $config['allow_sig'] && $signature && $auth->acl_get('f_sigs', $forum_id)) @@ -114,15 +113,13 @@ function format_display(&$message, &$signature, $uid, $siguid, $html, $bbcode, $ $signature = trim($signature); $bbcode->bbcode_second_pass($signature, $siguid); + $signature = smilie_text($signature); - $signature = (!$config['allow_smilies']) ? preg_replace('#(((?>([^><]+|(?R)))*)\<))#se', "preg_replace(\$censors['match'], \$censors['replace'], '\\0')", '>' . $signature . '<'), 1, -1)); - } - - $signature = str_replace("\n", '
', $signature); + }*/ + $signature = str_replace("\n", '
', censor_text($signature)); } else { -- cgit v1.2.1