diff options
author | Andreas Fischer <bantu@phpbb.com> | 2015-02-04 21:09:54 +0100 |
---|---|---|
committer | Andreas Fischer <bantu@phpbb.com> | 2015-02-04 21:09:54 +0100 |
commit | 3267c6a61ad88bf96d6f0159dcb565ded4704e82 (patch) | |
tree | f7bfb53911f454dfa75cb2f00a0e1395dedbe44f /phpBB/viewtopic.php | |
parent | f9ab676530b862798f3eea6bf53415ca3b0faff8 (diff) | |
parent | 52446c8327426c59da74257885fd09591c9e1fb3 (diff) | |
download | forums-3267c6a61ad88bf96d6f0159dcb565ded4704e82.tar forums-3267c6a61ad88bf96d6f0159dcb565ded4704e82.tar.gz forums-3267c6a61ad88bf96d6f0159dcb565ded4704e82.tar.bz2 forums-3267c6a61ad88bf96d6f0159dcb565ded4704e82.tar.xz forums-3267c6a61ad88bf96d6f0159dcb565ded4704e82.zip |
Merge pull request #3257 from MGaetan89/ticket/13455
[ticket/13455] Change request_var() calls with $request->variable()
* MGaetan89/ticket/13455:
[ticket/13455] Remove `request_var()` references from comments
[ticket/13455] Remove unnecessary calls to `utf8_normalize_nfc()`
[ticket/13455] Update calls to `request_var()`
Diffstat (limited to 'phpBB/viewtopic.php')
-rw-r--r-- | phpBB/viewtopic.php | 30 |
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); } |