diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2004-02-21 12:47:35 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2004-02-21 12:47:35 +0000 |
commit | c74d2538ec68fa1c6f3da6d26e31a09f2045557b (patch) | |
tree | be1c11d7d9e403c7b884c7d08e34111f0806d350 /phpBB/includes/mcp/mcp_main.php | |
parent | 9c12fe83db3914b4e35bdcef75cc70e2f75044d6 (diff) | |
download | forums-c74d2538ec68fa1c6f3da6d26e31a09f2045557b.tar forums-c74d2538ec68fa1c6f3da6d26e31a09f2045557b.tar.gz forums-c74d2538ec68fa1c6f3da6d26e31a09f2045557b.tar.bz2 forums-c74d2538ec68fa1c6f3da6d26e31a09f2045557b.tar.xz forums-c74d2538ec68fa1c6f3da6d26e31a09f2045557b.zip |
- 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
Diffstat (limited to 'phpBB/includes/mcp/mcp_main.php')
-rw-r--r-- | phpBB/includes/mcp/mcp_main.php | 16 |
1 files changed, 4 insertions, 12 deletions
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('#<!\-\- s(.*?) \-\-><img src="\{SMILE_PATH\}\/.*? \/><!\-\- s\1 \-\->#', '\1', $message) : str_replace('<img src="{SMILE_PATH}', '<img src="' . $config['smilies_path'], $message); + $message = smilie_text($message); $message = nl2br($message); @@ -1364,7 +1356,7 @@ class mcp_main extends mcp $bbcode = new bbcode($post_info['bbcode_bitfield']); $bbcode->bbcode_second_pass($message, $post_info['bbcode_uid'], $post_info['bbcode_bitfield']); } - $message = (empty($config['allow_smilies']) || !$user->optionget('viewsmilies')) ? preg_replace('#<!\-\- s(.*?) \-\-><img src="\{SMILE_PATH\}\/.*? \/><!\-\- s\1 \-\->#', '\1', $message) : str_replace('<img src="{SMILE_PATH}', '<img src="' . $config['smilies_path'], $message); + $message = smilie_text($message); $template->assign_vars(array( 'S_MCP_ACTION' => $this->url . '&mode=modoptions', |