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_display.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'phpBB/includes/functions_display.php') diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php index 3f0bee5d39..dc86e48ec9 100644 --- a/phpBB/includes/functions_display.php +++ b/phpBB/includes/functions_display.php @@ -334,7 +334,7 @@ function display_forums($root_data = '', $display_moderators = TRUE) function display_attachments($blockname, $attachment_data, &$update_count, $force_physical = false, $return = false) { global $extensions, $template, $cache, $attachment_tpl; - global $config, $user, $phpbb_root_path, $phpEx, $SID, $censors; + global $config, $user, $phpbb_root_path, $phpEx, $SID; // $starttime = explode(' ', microtime()); // $starttime = $starttime[1] + $starttime[0]; @@ -377,12 +377,6 @@ function display_attachments($blockname, $attachment_data, &$update_count, $forc } } - if (empty($censors)) - { - $censors = array(); - obtain_word_list($censors); - } - if (empty($extensions) || !is_array($extensions)) { $extensions = array(); @@ -413,7 +407,7 @@ function display_attachments($blockname, $attachment_data, &$update_count, $forc $filesize = ($filesize >= 1048576) ? round((round($filesize / 1048576 * 100) / 100), 2) : (($filesize >= 1024) ? round((round($filesize / 1024 * 100) / 100), 2) : $filesize); $display_name = $attachment['real_filename']; - $comment = (sizeof($censors)) ? preg_replace($censors['match'], $censors['replace'], str_replace("\n", '
', $attachment['comment'])) : str_replace("\n", '
', $attachment['comment']); + $comment = str_replace("\n", '
', censor_text($attachment['comment'])); $denied = FALSE; -- cgit v1.2.1