aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/viewtopic.php
diff options
context:
space:
mode:
authorGaëtan Muller <m.gaetan89@gmail.com>2015-01-04 20:41:04 +0100
committerGaëtan Muller <m.gaetan89@gmail.com>2015-02-03 20:50:40 +0100
commitf6e06da4c68917dafb057bf7fe19f884a3e148c2 (patch)
treee68e2c80b8588e066069a574ea7d0bda887c6ddd /phpBB/viewtopic.php
parent284aa8c496d658c196a0dfa3c90657415ee4c2ee (diff)
downloadforums-f6e06da4c68917dafb057bf7fe19f884a3e148c2.tar
forums-f6e06da4c68917dafb057bf7fe19f884a3e148c2.tar.gz
forums-f6e06da4c68917dafb057bf7fe19f884a3e148c2.tar.bz2
forums-f6e06da4c68917dafb057bf7fe19f884a3e148c2.tar.xz
forums-f6e06da4c68917dafb057bf7fe19f884a3e148c2.zip
[ticket/13455] Update calls to `request_var()`
PHPBB3-13455
Diffstat (limited to 'phpBB/viewtopic.php')
-rw-r--r--phpBB/viewtopic.php30
1 files changed, 15 insertions, 15 deletions
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index 2e27871f2c..ac5b0730db 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -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);
}