1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-05-05 23:25:30 +02:00

for some things we do not need the utf8 function. :)

git-svn-id: file:///svn/phpbb/trunk@6455 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen 2006-10-07 15:47:55 +00:00
parent 66c78d114b
commit f27edc4b5b
4 changed files with 7 additions and 21 deletions

View File

@ -122,12 +122,12 @@ class acp_bbcodes
{
$sql = 'SELECT 1 as test
FROM ' . BBCODES_TABLE . "
WHERE LOWER(bbcode_tag) = '" . $db->sql_escape(utf8_strtolower($data['bbcode_tag'])) . "'";
WHERE LOWER(bbcode_tag) = '" . $db->sql_escape(strtolower($data['bbcode_tag'])) . "'";
$result = $db->sql_query($sql);
$info = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
if ($info['test'] === '1' || in_array(utf8_strtolower($data['bbcode_tag']), $hard_coded))
if ($info['test'] === '1' || in_array(strtolower($data['bbcode_tag']), $hard_coded))
{
trigger_error($user->lang['BBCODE_INVALID_TAG_NAME'] . adm_back_link($this->u_action), E_USER_WARNING);
}
@ -358,10 +358,10 @@ class acp_bbcodes
// Lowercase tags
$bbcode_tag = preg_replace('/.*?\[([a-z0-9_-]+=?).*/i', '$1', $bbcode_match);
$fp_match = preg_replace('#\[/?' . $bbcode_tag . '#ie', "utf8_strtolower('\$0')", $fp_match);
$fp_replace = preg_replace('#\[/?' . $bbcode_tag . '#ie', "utf8_strtolower('\$0')", $fp_replace);
$sp_match = preg_replace('#\[/?' . $bbcode_tag . '#ie', "utf8_strtolower('\$0')", $sp_match);
$sp_replace = preg_replace('#\[/?' . $bbcode_tag . '#ie', "utf8_strtolower('\$0')", $sp_replace);
$fp_match = preg_replace('#\[/?' . $bbcode_tag . '#ie', "strtolower('\$0')", $fp_match);
$fp_replace = preg_replace('#\[/?' . $bbcode_tag . '#ie', "strtolower('\$0')", $fp_replace);
$sp_match = preg_replace('#\[/?' . $bbcode_tag . '#ie', "strtolower('\$0')", $sp_match);
$sp_replace = preg_replace('#\[/?' . $bbcode_tag . '#ie', "strtolower('\$0')", $sp_replace);
return array(
'bbcode_tag' => $bbcode_tag,

View File

@ -425,7 +425,7 @@ class dbal
$this->sql_transaction('rollback');
}
if (utf8_strlen($message) > 1024)
if (strlen($message) > 1024)
{
// We need to define $msg_long_text here to circumvent text stripping.
global $msg_long_text;

View File

@ -447,12 +447,6 @@ function compose_pm($id, $mode, $action)
if ($submit || $preview || $refresh)
{
$subject = request_var('subject', '', true);
if ($subject && strcmp($subject, utf8_strtoupper($subject)) === 0)
{
$subject = utf8_strtolower($subject);
}
$message_parser->message = request_var('message', '', true);
$icon_id = request_var('icon', 0);

View File

@ -529,14 +529,6 @@ if ($submit || $preview || $refresh)
{
$post_data['topic_cur_post_id'] = request_var('topic_cur_post_id', 0);
$post_data['post_subject'] = request_var('subject', '', true);
// If subject is all-uppercase then we make all lowercase (we do not want to be yelled at too :P)
// Admins/Mods might want to create all-uppercase topics, therefore we do not apply this check to them (they should know better ;))
if ($post_data['post_subject'] && !$auth->acl_gets('a_', 'm_', $forum_id) && strcmp($post_data['post_subject'], utf8_strtoupper($post_data['post_subject'])) === 0)
{
$post_data['post_subject'] = utf8_strtolower($post_data['post_subject']);
}
$message_parser->message = request_var('message', '', true);
$post_data['username'] = request_var('username', $post_data['username']);