1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-05 00:07:44 +02:00

[feature/request-class] Convert any direct access to $_* to use $request

PHPBB3-9716
This commit is contained in:
Igor Wiedler
2010-09-22 21:58:20 +02:00
parent 15883dfac2
commit fccd7f0ab5
28 changed files with 131 additions and 99 deletions

View File

@@ -610,6 +610,7 @@ class custom_profile
function get_var($field_validation, &$profile_row, $default_value, $preview)
{
global $user;
global $request;
$profile_row['field_ident'] = (isset($profile_row['var_name'])) ? $profile_row['var_name'] : 'pf_' . $profile_row['field_ident'];
$user_ident = $profile_row['field_ident'];
@@ -622,7 +623,7 @@ class custom_profile
{
if (isset($_REQUEST[$profile_row['field_ident']]))
{
$value = ($_REQUEST[$profile_row['field_ident']] === '') ? NULL : request_var($profile_row['field_ident'], $default_value);
$value = ($request->variable($profile_row['field_ident'], '') === '') ? NULL : $request->variable($profile_row['field_ident'], $default_value);
}
else
{
@@ -894,6 +895,7 @@ class custom_profile
{
global $phpbb_root_path, $phpEx;
global $config;
global $request;
$var_name = 'pf_' . $profile_row['field_ident'];
@@ -938,7 +940,7 @@ class custom_profile
break;
case FIELD_INT:
if (isset($_REQUEST[$var_name]) && $_REQUEST[$var_name] === '')
if (isset($_REQUEST[$var_name]) && $request->variable($var_name, '') === '')
{
$var = NULL;
}