summaryrefslogtreecommitdiff
path: root/includes/pages/user_questions.php
diff options
context:
space:
mode:
authormsquare <msquare@notrademark.de>2017-07-20 18:34:19 +0200
committerGitHub <noreply@github.com>2017-07-20 18:34:19 +0200
commit37d4edcd9ace5021b6eb02761a9c3865c5607f33 (patch)
tree16c0da4cd2d9c6c10f5d5e02c1b02bd0986636c2 /includes/pages/user_questions.php
parent9b3f6f557a127fef16be267c26f8239dc1c22126 (diff)
parentb7ebb05b8e71b391b6b029fceb5a2d00ff27004c (diff)
Merge pull request #328 from MyIgel/master
Changed $_GET, $_POST and $_REQUEST to use the Request object
Diffstat (limited to 'includes/pages/user_questions.php')
-rw-r--r--includes/pages/user_questions.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/includes/pages/user_questions.php b/includes/pages/user_questions.php
index 5cb60db3..fdf76aee 100644
--- a/includes/pages/user_questions.php
+++ b/includes/pages/user_questions.php
@@ -16,8 +16,9 @@ function questions_title()
function user_questions()
{
global $user;
+ $request = request();
- if (!isset($_REQUEST['action'])) {
+ if (!$request->has('action')) {
$open_questions = DB::select(
'SELECT * FROM `Questions` WHERE `AID` IS NULL AND `UID`=?',
[$user['UID']]
@@ -34,7 +35,7 @@ function user_questions()
return Questions_view($open_questions, $answered_questions, page_link_to('user_questions') . '&action=ask');
} else {
- switch ($_REQUEST['action']) {
+ switch ($request->input('action')) {
case 'ask':
$question = strip_request_item_nl('question');
if ($question != '') {
@@ -56,8 +57,8 @@ function user_questions()
}
break;
case 'delete':
- if (isset($_REQUEST['id']) && preg_match('/^\d{1,11}$/', $_REQUEST['id'])) {
- $question_id = $_REQUEST['id'];
+ if ($request->has('id') && preg_match('/^\d{1,11}$/', $request->input('id'))) {
+ $question_id = $request->input('id');
} else {
return error(_('Incomplete call, missing Question ID.'), true);
}