1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 14:00:31 +02:00

- 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
This commit is contained in:
Meik Sievertsen
2004-02-21 12:47:35 +00:00
parent 9c12fe83db
commit c74d2538ec
26 changed files with 211 additions and 254 deletions

View File

@@ -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 . '&amp;mode=modoptions',