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/mcp/mcp_main.php | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'phpBB/includes/mcp/mcp_main.php') diff --git a/phpBB/includes/mcp/mcp_main.php b/phpBB/includes/mcp/mcp_main.php index 3f7b752c26..d9b88eca67 100644 --- a/phpBB/includes/mcp/mcp_main.php +++ b/phpBB/includes/mcp/mcp_main.php @@ -349,10 +349,6 @@ class mcp_main extends mcp )); - // Define censored word matches - $censors = array(); - obtain_word_list($censors); - $topic_rows = array(); // TODO: no global announcements here @@ -438,12 +434,8 @@ class mcp_main extends mcp $topic_type .= $user->lang['VIEW_TOPIC_POLL'] . ' '; } - $topic_title = $row['topic_title']; - if (count($censors['match'])) - { - $topic_title = preg_replace($censors['match'], $censors['replace'], $topic_title); - } - + $topic_title = censor_text($row['topic_title']); + $template->assign_block_vars('topicrow', array( 'U_VIEW_TOPIC' => "mcp.$phpEx$SID&t=" . $row['topic_id'] . '&mode=topic_view', @@ -841,7 +833,7 @@ class mcp_main extends mcp $bbcode->bbcode_second_pass($message, $row['bbcode_uid'], $row['bbcode_bitfield']); } - $message = (empty($config['allow_smilies']) || !$user->data['user_viewsmilies']) ? preg_replace('##', '\1', $message) : str_replace('assign_vars(array( 'S_MCP_ACTION' => $this->url . '&mode=modoptions', -- cgit v1.2.1