[ticket/13455] Remove unnecessary calls to utf8_normalize_nfc()

PHPBB3-13455
This commit is contained in:
Gaëtan Muller 2015-02-02 21:35:46 +01:00
parent f6e06da4c6
commit abcb2680ee
36 changed files with 97 additions and 97 deletions

View file

@ -508,7 +508,7 @@ class acp_attachments
$ext_row = array();
}
$group_name = utf8_normalize_nfc($request->variable('group_name', '', true));
$group_name = $request->variable('group_name', '', true);
$new_group_name = ($action == 'add') ? $group_name : (($ext_row['group_name'] != $group_name) ? $group_name : '');
if (!$group_name)
@ -690,7 +690,7 @@ class acp_attachments
if ($action == 'add')
{
$ext_group_row = array(
'group_name' => utf8_normalize_nfc($request->variable('group_name', '', true)),
'group_name' => $request->variable('group_name', '', true),
'cat_id' => 0,
'allow_group' => 1,
'allow_in_pm' => 1,

View file

@ -86,8 +86,8 @@ class acp_bbcodes
$display_on_posting = $request->variable('display_on_posting', 0);
$bbcode_match = $request->variable('bbcode_match', '');
$bbcode_tpl = htmlspecialchars_decode(utf8_normalize_nfc($request->variable('bbcode_tpl', '', true)));
$bbcode_helpline = utf8_normalize_nfc($request->variable('bbcode_helpline', '', true));
$bbcode_tpl = htmlspecialchars_decode($request->variable('bbcode_tpl', '', true));
$bbcode_helpline = $request->variable('bbcode_helpline', '', true);
break;
}

View file

@ -484,7 +484,7 @@ class acp_board
}
$this->new_config = $config;
$cfg_array = (isset($_REQUEST['config'])) ? utf8_normalize_nfc($request->variable('config', array('' => ''), true)) : $this->new_config;
$cfg_array = (isset($_REQUEST['config'])) ? $request->variable('config', array('' => ''), true) : $this->new_config;
$error = array();
// We validate the complete config if wished

View file

@ -144,7 +144,7 @@ class acp_bots
include_once($phpbb_root_path . 'includes/functions_user.' . $phpEx);
$bot_row = array(
'bot_name' => utf8_normalize_nfc($request->variable('bot_name', '', true)),
'bot_name' => $request->variable('bot_name', '', true),
'bot_agent' => $request->variable('bot_agent', ''),
'bot_ip' => $request->variable('bot_ip', ''),
'bot_active' => $request->variable('bot_active', true),

View file

@ -49,7 +49,7 @@ class acp_disallow
if ($disallow)
{
$disallowed_user = str_replace('*', '%', utf8_normalize_nfc($request->variable('disallowed_user', '', true)));
$disallowed_user = str_replace('*', '%', $request->variable('disallowed_user', '', true));
if (!$disallowed_user)
{

View file

@ -42,8 +42,8 @@ class acp_email
$usernames = $request->variable('usernames', '', true);
$usernames = (!empty($usernames)) ? explode("\n", $usernames) : array();
$group_id = $request->variable('g', 0);
$subject = utf8_normalize_nfc($request->variable('subject', '', true));
$message = utf8_normalize_nfc($request->variable('message', '', true));
$subject = $request->variable('subject', '', true);
$message = $request->variable('message', '', true);
// Do the job ...
if ($submit)

View file

@ -117,14 +117,14 @@ class acp_forums
'type_action' => $request->variable('type_action', ''),
'forum_status' => $request->variable('forum_status', ITEM_UNLOCKED),
'forum_parents' => '',
'forum_name' => utf8_normalize_nfc($request->variable('forum_name', '', true)),
'forum_name' => $request->variable('forum_name', '', true),
'forum_link' => $request->variable('forum_link', ''),
'forum_link_track' => $request->variable('forum_link_track', false),
'forum_desc' => utf8_normalize_nfc($request->variable('forum_desc', '', true)),
'forum_desc' => $request->variable('forum_desc', '', true),
'forum_desc_uid' => '',
'forum_desc_options' => 7,
'forum_desc_bitfield' => '',
'forum_rules' => utf8_normalize_nfc($request->variable('forum_rules', '', true)),
'forum_rules' => $request->variable('forum_rules', '', true),
'forum_rules_uid' => '',
'forum_rules_options' => 7,
'forum_rules_bitfield' => '',
@ -445,7 +445,7 @@ class acp_forums
'parent_id' => $this->parent_id,
'forum_type' => FORUM_POST,
'forum_status' => ITEM_UNLOCKED,
'forum_name' => utf8_normalize_nfc($request->variable('forum_name', '', true)),
'forum_name' => $request->variable('forum_name', '', true),
'forum_link' => '',
'forum_link_track' => false,
'forum_desc' => '',

View file

@ -362,8 +362,8 @@ class acp_groups
trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$group_name = utf8_normalize_nfc($request->variable('group_name', '', true));
$group_desc = utf8_normalize_nfc($request->variable('group_desc', '', true));
$group_name = $request->variable('group_name', '', true);
$group_desc = $request->variable('group_desc', '', true);
$group_type = $request->variable('group_type', GROUP_FREE);
$allow_desc_bbcode = $request->variable('desc_parse_bbcode', false);
@ -618,7 +618,7 @@ class acp_groups
}
else if (!$group_id)
{
$group_name = utf8_normalize_nfc($request->variable('group_name', '', true));
$group_name = $request->variable('group_name', '', true);
$group_desc_data = array(
'text' => '',
'allow_bbcode' => true,

View file

@ -334,16 +334,16 @@ class acp_icons
$image_width = (isset($_POST['width'])) ? $request->variable('width', array('' => 0)) : array();
$image_height = (isset($_POST['height'])) ? $request->variable('height', array('' => 0)) : array();
$image_add = (isset($_POST['add_img'])) ? $request->variable('add_img', array('' => 0)) : array();
$image_emotion = utf8_normalize_nfc($request->variable('emotion', array('' => ''), true));
$image_code = utf8_normalize_nfc($request->variable('code', array('' => ''), true));
$image_emotion = $request->variable('emotion', array('' => ''), true);
$image_code = $request->variable('code', array('' => ''), true);
$image_display_on_posting = (isset($_POST['display_on_posting'])) ? $request->variable('display_on_posting', array('' => 0)) : array();
// Ok, add the relevant bits if we are adding new codes to existing emoticons...
if ($request->variable('add_additional_code', false, false, \phpbb\request\request_interface::POST))
{
$add_image = $request->variable('add_image', '');
$add_code = utf8_normalize_nfc($request->variable('add_code', '', true));
$add_emotion = utf8_normalize_nfc($request->variable('add_emotion', '', true));
$add_code = $request->variable('add_code', '', true);
$add_emotion = $request->variable('add_emotion', '', true);
if ($add_image && $add_emotion && $add_code)
{

View file

@ -82,8 +82,8 @@ class acp_language
$sql_ary = array(
'lang_english_name' => $request->variable('lang_english_name', $row['lang_english_name']),
'lang_local_name' => utf8_normalize_nfc($request->variable('lang_local_name', $row['lang_local_name'], true)),
'lang_author' => utf8_normalize_nfc($request->variable('lang_author', $row['lang_author'], true)),
'lang_local_name' => $request->variable('lang_local_name', $row['lang_local_name'], true),
'lang_author' => $request->variable('lang_author', $row['lang_author'], true),
);
$db->sql_query('UPDATE ' . LANG_TABLE . '

View file

@ -70,7 +70,7 @@ class acp_logs
$conditions['log_time'] = array('>=', time() - ($sort_days * 86400));
}
$keywords = utf8_normalize_nfc($request->variable('keywords', '', true));
$keywords = $request->variable('keywords', '', true);
$conditions['keywords'] = $keywords;
}
@ -108,7 +108,7 @@ class acp_logs
$sql_where = ($sort_days) ? (time() - ($sort_days * 86400)) : 0;
$sql_sort = $sort_by_sql[$sort_key] . ' ' . (($sort_dir == 'd') ? 'DESC' : 'ASC');
$keywords = utf8_normalize_nfc($request->variable('keywords', '', true));
$keywords = $request->variable('keywords', '', true);
$keywords_param = !empty($keywords) ? '&keywords=' . urlencode(htmlspecialchars_decode($keywords)) : '';
$l_title = $user->lang['ACP_' . strtoupper($mode) . '_LOGS'];

View file

@ -253,7 +253,7 @@ class acp_modules
'module_enabled' => 0,
'module_display' => 1,
'parent_id' => 0,
'module_langname' => utf8_normalize_nfc($request->variable('module_langname', '', true)),
'module_langname' => $request->variable('module_langname', '', true),
'module_mode' => '',
'module_auth' => '',
);
@ -266,7 +266,7 @@ class acp_modules
$module_data['module_display'] = $request->variable('module_display', (int) $module_row['module_display']);
$module_data['parent_id'] = $request->variable('module_parent_id', (int) $module_row['parent_id']);
$module_data['module_class'] = $this->module_class;
$module_data['module_langname'] = utf8_normalize_nfc($request->variable('module_langname', (string) $module_row['module_langname'], true));
$module_data['module_langname'] = $request->variable('module_langname', (string) $module_row['module_langname'], true);
$module_data['module_mode'] = $request->variable('module_mode', (string) $module_row['module_mode']);
$submit = (isset($_POST['submit'])) ? true : false;

View file

@ -148,8 +148,8 @@ class acp_permission_roles
trigger_error($user->lang['FORM_INVALID']. adm_back_link($this->u_action), E_USER_WARNING);
}
$role_name = utf8_normalize_nfc($request->variable('role_name', '', true));
$role_description = utf8_normalize_nfc($request->variable('role_description', '', true));
$role_name = $request->variable('role_name', '', true);
$role_description = $request->variable('role_description', '', true);
$auth_settings = $request->variable('setting', array('' => 0));
if (!$role_name)
@ -228,8 +228,8 @@ class acp_permission_roles
$options_from = $request->variable('options_from', 0);
$role_row = array(
'role_name' => utf8_normalize_nfc($request->variable('role_name', '', true)),
'role_description' => utf8_normalize_nfc($request->variable('role_description', '', true)),
'role_name' => $request->variable('role_name', '', true),
'role_description' => $request->variable('role_description', '', true),
'role_type' => $permission_type,
);

View file

@ -347,7 +347,7 @@ class acp_profile
'field_is_contact' => 0,
'field_contact_desc'=> '',
'field_contact_url' => '',
'lang_name' => utf8_normalize_nfc($request->variable('field_ident', '', true)),
'lang_name' => $request->variable('field_ident', '', true),
'lang_explain' => '',
'lang_default_value'=> '')
);
@ -416,7 +416,7 @@ class acp_profile
// step 2
foreach ($exclude[2] as $key)
{
$var = utf8_normalize_nfc($request->variable($key, $field_row[$key], true));
$var = $request->variable($key, $field_row[$key], true);
$field_data = $cp->vars;
$var = $profile_field->get_excluded_options($key, $action, $var, $field_data, 2);
@ -462,7 +462,7 @@ class acp_profile
foreach ($exclude[3] as $key)
{
$cp->vars[$key] = utf8_normalize_nfc($request->variable($key, array(0 => ''), true));
$cp->vars[$key] = $request->variable($key, array(0 => ''), true);
if (!$cp->vars[$key] && $action == 'edit')
{
@ -760,7 +760,7 @@ class acp_profile
$lang_options[$lang_id]['lang_iso'] = $lang_iso;
foreach ($options as $field => $field_type)
{
$value = ($action == 'create') ? utf8_normalize_nfc($request->variable('l_' . $field, array(0 => ''), true)) : $cp->vars['l_' . $field];
$value = ($action == 'create') ? $request->variable('l_' . $field, array(0 => ''), true) : $cp->vars['l_' . $field];
if ($field == 'lang_options')
{
$var = (!isset($cp->vars['l_lang_options'][$lang_id]) || !is_array($cp->vars['l_lang_options'][$lang_id])) ? $cp->vars['lang_options'] : $cp->vars['l_lang_options'][$lang_id];

View file

@ -50,7 +50,7 @@ class acp_ranks
{
trigger_error($user->lang['FORM_INVALID']. adm_back_link($this->u_action), E_USER_WARNING);
}
$rank_title = utf8_normalize_nfc($request->variable('title', '', true));
$rank_title = $request->variable('title', '', true);
$special_rank = $request->variable('special_rank', 0);
$min_posts = ($special_rank) ? 0 : max(0, $request->variable('min_posts', 0));
$rank_image = $request->variable('rank_image', '');

View file

@ -50,8 +50,8 @@ class acp_reasons
case 'edit':
$reason_row = array(
'reason_title' => utf8_normalize_nfc($request->variable('reason_title', '', true)),
'reason_description' => utf8_normalize_nfc($request->variable('reason_description', '', true)),
'reason_title' => $request->variable('reason_title', '', true),
'reason_description' => $request->variable('reason_description', '', true),
);
if ($submit)

View file

@ -40,7 +40,7 @@ class acp_users
$this->tpl_name = 'acp_users';
$error = array();
$username = utf8_normalize_nfc($request->variable('username', '', true));
$username = $request->variable('username', '', true);
$user_id = $request->variable('u', 0);
$action = $request->variable('action', '');
@ -304,8 +304,8 @@ class acp_users
break;
}
$ban_reason = utf8_normalize_nfc($request->variable('ban_reason', $user->lang[$reason], true));
$ban_give_reason = utf8_normalize_nfc($request->variable('ban_give_reason', '', true));
$ban_reason = $request->variable('ban_reason', $user->lang[$reason], true);
$ban_give_reason = $request->variable('ban_give_reason', '', true);
// Log not used at the moment, we simply utilize the ban function.
$result = user_ban(substr($action, 3), $ban, 0, 0, 0, $ban_reason, $ban_give_reason);
@ -794,7 +794,7 @@ class acp_users
// Handle registration info updates
$data = array(
'username' => utf8_normalize_nfc($request->variable('user', $user_row['username'], true)),
'username' => $request->variable('user', $user_row['username'], true),
'user_founder' => $request->variable('user_founder', ($user_row['user_type'] == USER_FOUNDER) ? 1 : 0),
'email' => strtolower($request->variable('user_email', $user_row['user_email'])),
'new_password' => $request->variable('new_password', '', true),
@ -1131,7 +1131,7 @@ class acp_users
$deletemark = (isset($_POST['delmarked'])) ? true : false;
$deleteall = (isset($_POST['delall'])) ? true : false;
$marked = $request->variable('mark', array(0));
$message = utf8_normalize_nfc($request->variable('message', '', true));
$message = $request->variable('message', '', true);
/* @var $pagination \phpbb\pagination */
$pagination = $phpbb_container->get('pagination');
@ -1245,7 +1245,7 @@ class acp_users
$deleteall = (isset($_POST['delall'])) ? true : false;
$confirm = (isset($_POST['confirm'])) ? true : false;
$marked = $request->variable('mark', array(0));
$message = utf8_normalize_nfc($request->variable('message', '', true));
$message = $request->variable('message', '', true);
// Sort keys
$sort_days = $request->variable('st', 0);
@ -1398,7 +1398,7 @@ class acp_users
$user_row['iso_lang_id'] = $row['lang_id'];
$data = array(
'jabber' => utf8_normalize_nfc($request->variable('jabber', $user_row['user_jabber'], true)),
'jabber' => $request->variable('jabber', $user_row['user_jabber'], true),
'bday_day' => 0,
'bday_month' => 0,
'bday_year' => 0,
@ -1531,7 +1531,7 @@ class acp_users
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
$data = array(
'dateformat' => utf8_normalize_nfc($request->variable('dateformat', $user_row['user_dateformat'], true)),
'dateformat' => $request->variable('dateformat', $user_row['user_dateformat'], true),
'lang' => basename($request->variable('lang', $user_row['user_lang'])),
'tz' => $request->variable('tz', $user_row['user_timezone']),
'style' => $request->variable('style', $user_row['user_style']),

View file

@ -89,8 +89,8 @@ class acp_words
}
$word_id = $request->variable('id', 0);
$word = utf8_normalize_nfc($request->variable('word', '', true));
$replacement = utf8_normalize_nfc($request->variable('replacement', '', true));
$word = $request->variable('word', '', true);
$replacement = $request->variable('replacement', '', true);
if ($word === '' || $replacement === '')
{

View file

@ -124,7 +124,7 @@ class mcp_logs
}
else if ($deleteall)
{
$keywords = utf8_normalize_nfc($request->variable('keywords', '', true));
$keywords = $request->variable('keywords', '', true);
$conditions = array(
'forum_id' => array('IN' => $forum_list),
@ -175,7 +175,7 @@ class mcp_logs
$sql_where = ($sort_days) ? (time() - ($sort_days * 86400)) : 0;
$sql_sort = $sort_by_sql[$sort_key] . ' ' . (($sort_dir == 'd') ? 'DESC' : 'ASC');
$keywords = utf8_normalize_nfc($request->variable('keywords', '', true));
$keywords = $request->variable('keywords', '', true);
$keywords_param = !empty($keywords) ? '&keywords=' . urlencode(htmlspecialchars_decode($keywords)) : '';
// Grab log data

View file

@ -117,7 +117,7 @@ class mcp_notes
$deletemark = ($action == 'del_marked') ? true : false;
$deleteall = ($action == 'del_all') ? true : false;
$marked = $request->variable('marknote', array(0));
$usernote = utf8_normalize_nfc($request->variable('usernote', '', true));
$usernote = $request->variable('usernote', '', true);
// Handle any actions
if (($deletemark || $deleteall) && $auth->acl_get('a_clearlogs'))
@ -201,7 +201,7 @@ class mcp_notes
$sql_where = ($st) ? (time() - ($st * 86400)) : 0;
$sql_sort = $sort_by_sql[$sk] . ' ' . (($sd == 'd') ? 'DESC' : 'ASC');
$keywords = utf8_normalize_nfc($request->variable('keywords', '', true));
$keywords = $request->variable('keywords', '', true);
$keywords_param = !empty($keywords) ? '&keywords=' . urlencode(htmlspecialchars_decode($keywords)) : '';
$log_data = array();

View file

@ -45,7 +45,7 @@ function mcp_topic_view($id, $mode, $action)
// Set up some vars
$icon_id = $request->variable('icon', 0);
$subject = utf8_normalize_nfc($request->variable('subject', '', true));
$subject = $request->variable('subject', '', true);
$start = $request->variable('start', 0);
$sort_days_old = $request->variable('st_old', 0);
$forum_id = $request->variable('f', 0);

View file

@ -196,7 +196,7 @@ class mcp_warn
$post_id = $request->variable('p', 0);
$forum_id = $request->variable('f', 0);
$notify = (isset($_REQUEST['notify_user'])) ? true : false;
$warning = utf8_normalize_nfc($request->variable('warning', '', true));
$warning = $request->variable('warning', '', true);
$sql = 'SELECT u.*, p.*
FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . " u
@ -376,7 +376,7 @@ class mcp_warn
$user_id = $request->variable('u', 0);
$username = $request->variable('username', '', true);
$notify = (isset($_REQUEST['notify_user'])) ? true : false;
$warning = utf8_normalize_nfc($request->variable('warning', '', true));
$warning = $request->variable('warning', '', true);
$sql_where = ($user_id) ? "user_id = $user_id" : "username_clean = '" . $db->sql_escape(utf8_clean_string($username)) . "'";

View file

@ -1475,7 +1475,7 @@ class parse_message extends bbcode_firstpass
$error = array();
$num_attachments = sizeof($this->attachment_data);
$this->filename_data['filecomment'] = utf8_normalize_nfc($request->variable('filecomment', '', true));
$this->filename_data['filecomment'] = $request->variable('filecomment', '', true);
$upload = $request->file($form_name);
$upload_file = (!empty($upload) && $upload['name'] !== 'none' && trim($upload['name']));
@ -1483,7 +1483,7 @@ class parse_message extends bbcode_firstpass
$delete_file = (isset($_POST['delete_file'])) ? true : false;
// First of all adjust comments if changed
$actual_comment_list = utf8_normalize_nfc($request->variable('comment_list', array(''), true));
$actual_comment_list = $request->variable('comment_list', array(''), true);
foreach ($actual_comment_list as $comment_key => $comment)
{
@ -1695,7 +1695,7 @@ class parse_message extends bbcode_firstpass
global $user, $db, $phpbb_root_path, $phpEx, $config;
global $request;
$this->filename_data['filecomment'] = utf8_normalize_nfc($request->variable('filecomment', '', true));
$this->filename_data['filecomment'] = $request->variable('filecomment', '', true);
$attachment_data = $request->variable('attachment_data', array(0 => array('' => '')), true, \phpbb\request\request_interface::POST);
$this->attachment_data = array();

View file

@ -510,8 +510,8 @@ class ucp_groups
// Did we submit?
if ($update)
{
$group_name = utf8_normalize_nfc($request->variable('group_name', '', true));
$group_desc = utf8_normalize_nfc($request->variable('group_desc', '', true));
$group_name = $request->variable('group_name', '', true);
$group_desc = $request->variable('group_desc', '', true);
$group_type = $request->variable('group_type', GROUP_FREE);
$allow_desc_bbcode = $request->variable('desc_parse_bbcode', false);
@ -621,7 +621,7 @@ class ucp_groups
}
else if (!$group_id)
{
$group_name = utf8_normalize_nfc($request->variable('group_name', '', true));
$group_name = $request->variable('group_name', '', true);
$group_desc_data = array(
'text' => '',
'allow_bbcode' => true,
@ -1018,7 +1018,7 @@ class ucp_groups
$user->add_lang(array('acp/groups', 'acp/common'));
$names = utf8_normalize_nfc($request->variable('usernames', '', true));
$names = $request->variable('usernames', '', true);
if (!$group_id)
{

View file

@ -480,8 +480,8 @@ class ucp_main
if ($submit && $edit)
{
$draft_subject = utf8_normalize_nfc($request->variable('subject', '', true));
$draft_message = utf8_normalize_nfc($request->variable('message', '', true));
$draft_subject = $request->variable('subject', '', true);
$draft_message = $request->variable('message', '', true);
if (check_form_key('ucp_draft'))
{
if ($draft_message && $draft_subject)

View file

@ -620,9 +620,9 @@ function compose_pm($id, $mode, $action, $user_folders = array())
// Save Draft
if ($save && $auth->acl_get('u_savedrafts'))
{
$subject = utf8_normalize_nfc($request->variable('subject', '', true));
$subject = $request->variable('subject', '', true);
$subject = (!$subject && $action != 'post') ? $user->lang['NEW_MESSAGE'] : $subject;
$message = utf8_normalize_nfc($request->variable('message', '', true));
$message = $request->variable('message', '', true);
if ($subject && $message)
{
@ -716,8 +716,8 @@ function compose_pm($id, $mode, $action, $user_folders = array())
{
$error[] = $user->lang['FORM_INVALID'];
}
$subject = utf8_normalize_nfc($request->variable('subject', '', true));
$message_parser->message = utf8_normalize_nfc($request->variable('message', '', true));
$subject = $request->variable('subject', '', true);
$message_parser->message = $request->variable('message', '', true);
$icon_id = $request->variable('icon', 0);

View file

@ -79,7 +79,7 @@ function message_options($id, $mode, $global_privmsgs_rules, $global_rule_condit
{
if (check_form_key('ucp_pm_options'))
{
$folder_name = utf8_normalize_nfc($request->variable('foldername', '', true));
$folder_name = $request->variable('foldername', '', true);
$msg = '';
if ($folder_name)
@ -135,7 +135,7 @@ function message_options($id, $mode, $global_privmsgs_rules, $global_rule_condit
{
if (check_form_key('ucp_pm_options'))
{
$new_folder_name = utf8_normalize_nfc($request->variable('new_folder_name', '', true));
$new_folder_name = $request->variable('new_folder_name', '', true);
$rename_folder_id= $request->variable('rename_folder_id', 0);
if (!$new_folder_name)
@ -295,7 +295,7 @@ function message_options($id, $mode, $global_privmsgs_rules, $global_rule_condit
$rule_option = $request->variable('rule_option', 0);
$cond_option = $request->variable('cond_option', '');
$action_option = explode('|', $request->variable('action_option', ''));
$rule_string = ($cond_option != 'none') ? utf8_normalize_nfc($request->variable('rule_string', '', true)) : '';
$rule_string = ($cond_option != 'none') ? $request->variable('rule_string', '', true) : '';
$rule_user_id = ($cond_option != 'none') ? $request->variable('rule_user_id', 0) : 0;
$rule_group_id = ($cond_option != 'none') ? $request->variable('rule_group_id', 0) : 0;
@ -722,7 +722,7 @@ function define_cond_option($hardcoded, $cond_option, $rule_option, $global_rule
switch ($condition)
{
case 'text':
$rule_string = utf8_normalize_nfc($request->variable('rule_string', '', true));
$rule_string = $request->variable('rule_string', '', true);
$template->assign_vars(array(
'S_TEXT_CONDITION' => true,
@ -736,7 +736,7 @@ function define_cond_option($hardcoded, $cond_option, $rule_option, $global_rule
case 'user':
$rule_user_id = $request->variable('rule_user_id', 0);
$rule_string = utf8_normalize_nfc($request->variable('rule_string', '', true));
$rule_string = $request->variable('rule_string', '', true);
if ($rule_string && !$rule_user_id)
{
@ -779,7 +779,7 @@ function define_cond_option($hardcoded, $cond_option, $rule_option, $global_rule
case 'group':
$rule_group_id = $request->variable('rule_group_id', 0);
$rule_string = utf8_normalize_nfc($request->variable('rule_string', '', true));
$rule_string = $request->variable('rule_string', '', true);
$sql = 'SELECT g.group_id, g.group_name, g.group_type
FROM ' . GROUPS_TABLE . ' g ';

View file

@ -46,7 +46,7 @@ class ucp_profile
case 'reg_details':
$data = array(
'username' => utf8_normalize_nfc($request->variable('username', $user->data['username'], true)),
'username' => $request->variable('username', $user->data['username'], true),
'email' => strtolower($request->variable('email', $user->data['user_email'])),
'new_password' => $request->variable('new_password', '', true),
'cur_password' => $request->variable('cur_password', '', true),
@ -302,7 +302,7 @@ class ucp_profile
$cp_data = $cp_error = array();
$data = array(
'jabber' => utf8_normalize_nfc($request->variable('jabber', $user->data['user_jabber'], true)),
'jabber' => $request->variable('jabber', $user->data['user_jabber'], true),
);
if ($config['allow_birthdays'])

View file

@ -115,7 +115,7 @@ class ucp_register
{
// We do not include the password
$s_hidden_fields = array_merge($s_hidden_fields, array(
'username' => utf8_normalize_nfc($request->variable('username', '', true)),
'username' => $request->variable('username', '', true),
'email' => strtolower($request->variable('email', '')),
'lang' => $user->lang_name,
'tz' => $request->variable('tz', $config['board_timezone']),
@ -192,7 +192,7 @@ class ucp_register
$timezone = $config['board_timezone'];
$data = array(
'username' => utf8_normalize_nfc($request->variable('username', '', true)),
'username' => $request->variable('username', '', true),
'new_password' => $request->variable('new_password', '', true),
'password_confirm' => $request->variable('password_confirm', '', true),
'email' => strtolower($request->variable('email', '')),

View file

@ -2090,7 +2090,7 @@ class install_install extends module
'dbname' => $request->variable('dbname', ''),
'table_prefix' => $request->variable('table_prefix', ''),
'default_lang' => basename($request->variable('default_lang', '')),
'admin_name' => utf8_normalize_nfc($request->variable('admin_name', '', true)),
'admin_name' => $request->variable('admin_name', '', true),
'admin_pass1' => $request->variable('admin_pass1', '', true),
'admin_pass2' => $request->variable('admin_pass2', '', true),
'board_email' => strtolower($request->variable('board_email', '')),

View file

@ -76,7 +76,7 @@ $topic_id = $request->variable('t', 0);
$forum_id = $request->variable('f', 0);
$report_id = $request->variable('r', 0);
$user_id = $request->variable('u', 0);
$username = utf8_normalize_nfc($request->variable('username', '', true));
$username = $request->variable('username', '', true);
if ($post_id)
{

View file

@ -411,7 +411,7 @@ switch ($mode)
include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
$subject = sprintf($user->lang['IM_JABBER_SUBJECT'], $user->data['username'], $config['server_name']);
$message = utf8_normalize_nfc($request->variable('message', '', true));
$message = $request->variable('message', '', true);
if (empty($message))
{

View file

@ -65,7 +65,7 @@ class qa
// read input
$this->confirm_id = $request->variable('qa_confirm_id', '');
$this->answer = utf8_normalize_nfc($request->variable('qa_answer', '', true));
$this->answer = $request->variable('qa_answer', '', true);
$this->type = (int) $type;
$this->question_lang = $user->lang_name;
@ -546,7 +546,7 @@ class qa
{
global $db, $request;
$answer = ($this->question_strict) ? utf8_normalize_nfc($request->variable('qa_answer', '', true)) : utf8_clean_string(utf8_normalize_nfc($request->variable('qa_answer', '', true)));
$answer = ($this->question_strict) ? $request->variable('qa_answer', '', true) : utf8_clean_string($request->variable('qa_answer', '', true));
$sql = 'SELECT answer_text
FROM ' . $this->table_captcha_answers . '
@ -830,7 +830,7 @@ class qa
{
global $request;
$answers = utf8_normalize_nfc($request->variable('answers', '', true));
$answers = $request->variable('answers', '', true);
$question = array(
'question_text' => $request->variable('question_text', '', true),
'strict' => $request->variable('strict', false),

View file

@ -676,9 +676,9 @@ $quote_status = true;
// Save Draft
if ($save && $user->data['is_registered'] && $auth->acl_get('u_savedrafts') && ($mode == 'reply' || $mode == 'post' || $mode == 'quote'))
{
$subject = utf8_normalize_nfc($request->variable('subject', '', true));
$subject = $request->variable('subject', '', true);
$subject = (!$subject && $mode != 'post') ? $post_data['topic_title'] : $subject;
$message = utf8_normalize_nfc($request->variable('message', '', true));
$message = $request->variable('message', '', true);
if ($subject && $message)
{
@ -810,11 +810,11 @@ if ($load && ($mode == 'reply' || $mode == 'quote' || $mode == 'post') && $post_
if ($submit || $preview || $refresh)
{
$post_data['topic_cur_post_id'] = $request->variable('topic_cur_post_id', 0);
$post_data['post_subject'] = utf8_normalize_nfc($request->variable('subject', '', true));
$message_parser->message = utf8_normalize_nfc($request->variable('message', '', true));
$post_data['post_subject'] = $request->variable('subject', '', true);
$message_parser->message = $request->variable('message', '', true);
$post_data['username'] = utf8_normalize_nfc($request->variable('username', $post_data['username'], true));
$post_data['post_edit_reason'] = ($request->variable('edit_reason', false, false, \phpbb\request\request_interface::POST) && $mode == 'edit' && $auth->acl_get('m_edit', $forum_id)) ? utf8_normalize_nfc($request->variable('edit_reason', '', true)) : '';
$post_data['username'] = $request->variable('username', $post_data['username'], true);
$post_data['post_edit_reason'] = ($request->variable('edit_reason', false, false, \phpbb\request\request_interface::POST) && $mode == 'edit' && $auth->acl_get('m_edit', $forum_id)) ? $request->variable('edit_reason', '', true) : '';
$post_data['orig_topic_type'] = $post_data['topic_type'];
$post_data['topic_type'] = $request->variable('topic_type', (($mode != 'post') ? (int) $post_data['topic_type'] : POST_NORMAL));
@ -887,9 +887,9 @@ if ($submit || $preview || $refresh)
}
else
{
$post_data['poll_title'] = utf8_normalize_nfc($request->variable('poll_title', '', true));
$post_data['poll_title'] = $request->variable('poll_title', '', true);
$post_data['poll_length'] = $request->variable('poll_length', 0);
$post_data['poll_option_text'] = utf8_normalize_nfc($request->variable('poll_option_text', '', true));
$post_data['poll_option_text'] = $request->variable('poll_option_text', '', true);
$post_data['poll_max_options'] = $request->variable('poll_max_options', 1);
$post_data['poll_vote_change'] = ($auth->acl_get('f_votechg', $forum_id) && $auth->acl_get('f_vote', $forum_id) && isset($_POST['poll_vote_change'])) ? 1 : 0;
}
@ -1074,9 +1074,9 @@ if ($submit || $preview || $refresh)
if ($config['enable_post_confirm'] && !$user->data['is_registered'] && in_array($mode, array('quote', 'post', 'reply')))
{
$captcha_data = array(
'message' => utf8_normalize_nfc($request->variable('message', '', true)),
'subject' => utf8_normalize_nfc($request->variable('subject', '', true)),
'username' => utf8_normalize_nfc($request->variable('username', '', true)),
'message' => $request->variable('message', '', true),
'subject' => $request->variable('subject', '', true),
'username' => $request->variable('username', '', true),
);
$vc_response = $captcha->validate($captcha_data);
if ($vc_response)

View file

@ -29,7 +29,7 @@ $forum_id = $request->variable('f', 0);
$post_id = $request->variable('p', 0);
$pm_id = $request->variable('pm', 0);
$reason_id = $request->variable('reason_id', 0);
$report_text = utf8_normalize_nfc($request->variable('report_text', '', true));
$report_text = $request->variable('report_text', '', true);
$user_notify = ($user->data['is_registered']) ? $request->variable('notify', 0) : false;
$submit = (isset($_POST['submit'])) ? true : false;

View file

@ -33,8 +33,8 @@ $topic_id = $request->variable('t', 0);
$view = $request->variable('view', '');
$submit = $request->variable('submit', false);
$keywords = utf8_normalize_nfc($request->variable('keywords', '', true));
$add_keywords = utf8_normalize_nfc($request->variable('add_keywords', '', true));
$keywords = $request->variable('keywords', '', true);
$add_keywords = $request->variable('add_keywords', '', true);
$author = $request->variable('author', '', true);
$author_id = $request->variable('author_id', 0);
$show_results = ($topic_id) ? 'posts' : $request->variable('sr', 'posts');