1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-12 03:34:04 +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

@@ -586,6 +586,7 @@ class install_convert extends module
{
global $template, $user, $phpbb_root_path, $phpEx, $db, $lang, $config, $cache;
global $convert, $convert_row, $message_parser, $skip_rows, $language;
global $request;
require($phpbb_root_path . 'config.' . $phpEx);
require($phpbb_root_path . 'includes/constants.' . $phpEx);
@@ -812,7 +813,7 @@ class install_convert extends module
if (!$current_table && !$skip_rows)
{
if (empty($_REQUEST['confirm']))
if (!$request->variable('confirm', false))
{
// If avatars / ranks / smilies folders are specified make sure they are writable
$bad_folders = array();
@@ -973,7 +974,7 @@ class install_convert extends module
));
return;
} // if (empty($_REQUEST['confirm']))
} // if (!$request->variable('confirm', false)))
$template->assign_block_vars('checks', array(
'S_LEGEND' => true,

View File

@@ -73,6 +73,7 @@ class install_update extends module
function main($mode, $sub)
{
global $template, $phpEx, $phpbb_root_path, $user, $db, $config, $cache, $auth, $language;
global $request;
$this->tpl_name = 'install_update';
$this->page_title = 'UPDATE_INSTALLATION';
@@ -251,7 +252,7 @@ class install_update extends module
$this->include_file('includes/diff/renderer.' . $phpEx);
// Make sure we stay at the file check if checking the files again
if (!empty($_POST['check_again']))
if ($request->variable('check_again', false, false, phpbb_request_interface::POST))
{
$sub = $this->p_master->sub = 'file_check';
}
@@ -358,7 +359,7 @@ class install_update extends module
$action = request_var('action', '');
// We are directly within an update. To make sure our update list is correct we check its status.
$update_list = (!empty($_POST['check_again'])) ? false : $cache->get('_update_list');
$update_list = ($request->variable('check_again', false, false, phpbb_request_interface::POST)) ? false : $cache->get('_update_list');
$modified = ($update_list !== false) ? @filemtime($cache->cache_dir . 'data_update_list.' . $phpEx) : 0;
// Make sure the list is up-to-date
@@ -714,7 +715,7 @@ class install_update extends module
{
$cache->put('_diff_files', $file_list);
if (!empty($_REQUEST['download']))
if ($request->variable('download', false))
{
$params[] = 'download=1';
}
@@ -829,7 +830,7 @@ class install_update extends module
$file_list['status'] = -1;
$cache->put('_diff_files', $file_list);
if (!empty($_REQUEST['download']))
if ($request->variable('download', false))
{
$this->include_file('includes/functions_compress.' . $phpEx);
@@ -963,7 +964,7 @@ class install_update extends module
'DATA' => $data,
'NAME' => $user->lang[strtoupper($method . '_' . $data)],
'EXPLAIN' => $user->lang[strtoupper($method . '_' . $data) . '_EXPLAIN'],
'DEFAULT' => (!empty($_REQUEST[$data])) ? request_var($data, '') : $default
'DEFAULT' => $request->variable($data, (string) $default),
));
}