1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-12 19:54:12 +02:00

[ticket/13455] Update calls to request_var()

PHPBB3-13455
This commit is contained in:
Gaëtan Muller
2015-01-04 20:41:04 +01:00
parent 284aa8c496
commit f6e06da4c6
93 changed files with 1052 additions and 1059 deletions

View File

@@ -27,26 +27,26 @@ $user->session_begin();
$auth->acl($user->data);
// Initial var setup
$forum_id = request_var('f', 0);
$topic_id = request_var('t', 0);
$post_id = request_var('p', 0);
$voted_id = request_var('vote_id', array('' => 0));
$forum_id = $request->variable('f', 0);
$topic_id = $request->variable('t', 0);
$post_id = $request->variable('p', 0);
$voted_id = $request->variable('vote_id', array('' => 0));
$voted_id = (sizeof($voted_id) > 1) ? array_unique($voted_id) : $voted_id;
$start = request_var('start', 0);
$view = request_var('view', '');
$start = $request->variable('start', 0);
$view = $request->variable('view', '');
$default_sort_days = (!empty($user->data['user_post_show_days'])) ? $user->data['user_post_show_days'] : 0;
$default_sort_key = (!empty($user->data['user_post_sortby_type'])) ? $user->data['user_post_sortby_type'] : 't';
$default_sort_dir = (!empty($user->data['user_post_sortby_dir'])) ? $user->data['user_post_sortby_dir'] : 'a';
$sort_days = request_var('st', $default_sort_days);
$sort_key = request_var('sk', $default_sort_key);
$sort_dir = request_var('sd', $default_sort_dir);
$sort_days = $request->variable('st', $default_sort_days);
$sort_key = $request->variable('sk', $default_sort_key);
$sort_dir = $request->variable('sd', $default_sort_dir);
$update = request_var('update', false);
$update = $request->variable('update', false);
/* @var $pagination \phpbb\pagination */
$pagination = $phpbb_container->get('pagination');
@@ -55,7 +55,7 @@ $s_can_vote = false;
/**
* @todo normalize?
*/
$hilit_words = request_var('hilit', '', true);
$hilit_words = $request->variable('hilit', '', true);
// Do we have a topic or post id?
if (!$topic_id && !$post_id)
@@ -498,9 +498,9 @@ if ($config['allow_topic_notify'])
}
// Bookmarks
if ($config['allow_bookmarks'] && $user->data['is_registered'] && request_var('bookmark', 0))
if ($config['allow_bookmarks'] && $user->data['is_registered'] && $request->variable('bookmark', 0))
{
if (check_link_hash(request_var('hash', ''), "topic_$topic_id"))
if (check_link_hash($request->variable('hash', ''), "topic_$topic_id"))
{
if (!$topic_data['bookmarked'])
{
@@ -2141,13 +2141,13 @@ if ($s_can_vote || $s_quick_reply)
// We overwrite $_REQUEST['f'] if there is no forum specified
// to be able to display the correct online list.
// One downside is that the user currently viewing this topic/post is not taken into account.
if (!request_var('f', 0))
if (!$request->variable('f', 0))
{
$request->overwrite('f', $forum_id);
}
// We need to do the same with the topic_id. See #53025.
if (!request_var('t', 0) && !empty($topic_id))
if (!$request->variable('t', 0) && !empty($topic_id))
{
$request->overwrite('t', $topic_id);
}