mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-18 06:21:19 +02:00
[ticket/13455] Update calls to request_var()
PHPBB3-13455
This commit is contained in:
@@ -45,7 +45,7 @@ class acp_profile
|
||||
$this->page_title = 'ACP_CUSTOM_PROFILE_FIELDS';
|
||||
|
||||
$field_id = $request->variable('field_id', 0);
|
||||
$action = (isset($_POST['create'])) ? 'create' : request_var('action', '');
|
||||
$action = (isset($_POST['create'])) ? 'create' : $request->variable('action', '');
|
||||
|
||||
$error = array();
|
||||
$s_hidden_fields = '';
|
||||
@@ -261,7 +261,7 @@ class acp_profile
|
||||
case 'create':
|
||||
case 'edit':
|
||||
|
||||
$step = request_var('step', 1);
|
||||
$step = $request->variable('step', 1);
|
||||
|
||||
$submit = (isset($_REQUEST['next']) || isset($_REQUEST['prev'])) ? true : false;
|
||||
$save = (isset($_REQUEST['save'])) ? true : false;
|
||||
@@ -325,7 +325,7 @@ class acp_profile
|
||||
// We are adding a new field, define basic params
|
||||
$lang_options = $field_row = array();
|
||||
|
||||
$field_type = request_var('field_type', '');
|
||||
$field_type = $request->variable('field_type', '');
|
||||
|
||||
if (!isset($this->type_collection[$field_type]))
|
||||
{
|
||||
@@ -334,7 +334,7 @@ class acp_profile
|
||||
|
||||
$profile_field = $this->type_collection[$field_type];
|
||||
$field_row = array_merge($profile_field->get_default_option_values(), array(
|
||||
'field_ident' => str_replace(' ', '_', utf8_clean_string(request_var('field_ident', '', true))),
|
||||
'field_ident' => str_replace(' ', '_', utf8_clean_string($request->variable('field_ident', '', true))),
|
||||
'field_required' => 0,
|
||||
'field_show_novalue'=> 0,
|
||||
'field_hide' => 0,
|
||||
@@ -347,7 +347,7 @@ class acp_profile
|
||||
'field_is_contact' => 0,
|
||||
'field_contact_desc'=> '',
|
||||
'field_contact_url' => '',
|
||||
'lang_name' => utf8_normalize_nfc(request_var('field_ident', '', true)),
|
||||
'lang_name' => utf8_normalize_nfc($request->variable('field_ident', '', true)),
|
||||
'lang_explain' => '',
|
||||
'lang_default_value'=> '')
|
||||
);
|
||||
@@ -377,7 +377,7 @@ class acp_profile
|
||||
|
||||
$options = $profile_field->prepare_options_form($exclude, $visibility_ary);
|
||||
|
||||
$cp->vars['field_ident'] = ($action == 'create' && $step == 1) ? utf8_clean_string(request_var('field_ident', $field_row['field_ident'], true)) : request_var('field_ident', $field_row['field_ident']);
|
||||
$cp->vars['field_ident'] = ($action == 'create' && $step == 1) ? utf8_clean_string($request->variable('field_ident', $field_row['field_ident'], true)) : $request->variable('field_ident', $field_row['field_ident']);
|
||||
$cp->vars['lang_name'] = $request->variable('lang_name', $field_row['lang_name'], true);
|
||||
$cp->vars['lang_explain'] = $request->variable('lang_explain', $field_row['lang_explain'], true);
|
||||
$cp->vars['lang_default_value'] = $request->variable('lang_default_value', $field_row['lang_default_value'], true);
|
||||
@@ -416,7 +416,7 @@ class acp_profile
|
||||
// step 2
|
||||
foreach ($exclude[2] as $key)
|
||||
{
|
||||
$var = utf8_normalize_nfc(request_var($key, $field_row[$key], true));
|
||||
$var = utf8_normalize_nfc($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_var($key, array(0 => ''), true));
|
||||
$cp->vars[$key] = utf8_normalize_nfc($request->variable($key, array(0 => ''), true));
|
||||
|
||||
if (!$cp->vars[$key] && $action == 'edit')
|
||||
{
|
||||
@@ -719,7 +719,7 @@ class acp_profile
|
||||
*/
|
||||
function build_language_options(&$cp, $field_type, $action = 'create')
|
||||
{
|
||||
global $user, $config, $db, $phpbb_container;
|
||||
global $user, $config, $db, $phpbb_container, $request;
|
||||
|
||||
$default_lang_id = (!empty($this->edit_lang_id)) ? $this->edit_lang_id : $this->lang_defs['iso'][$config['default_lang']];
|
||||
|
||||
@@ -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_var('l_' . $field, array(0 => ''), true)) : $cp->vars['l_' . $field];
|
||||
$value = ($action == 'create') ? utf8_normalize_nfc($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];
|
||||
@@ -816,9 +816,9 @@ class acp_profile
|
||||
*/
|
||||
function save_profile_field(&$cp, $field_type, $action = 'create')
|
||||
{
|
||||
global $db, $config, $user, $phpbb_container, $phpbb_log;
|
||||
global $db, $config, $user, $phpbb_container, $phpbb_log, $request;
|
||||
|
||||
$field_id = request_var('field_id', 0);
|
||||
$field_id = $request->variable('field_id', 0);
|
||||
|
||||
// Collect all information, if something is going wrong, abort the operation
|
||||
$profile_sql = $profile_lang = $empty_lang = $profile_lang_fields = array();
|
||||
|
Reference in New Issue
Block a user