diff options
author | Marc Alexander <admin@m-a-styles.de> | 2015-01-25 22:52:40 +0100 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2015-02-21 17:45:17 +0100 |
commit | d15e5372caf1d0811e1f2bc87d5deddba171cb09 (patch) | |
tree | 444c016cbd55aa92b08e8f9f67f53090815ee989 /phpBB/phpbb/captcha | |
parent | 12fe882741db91a155620d5870c6127798125720 (diff) | |
download | forums-d15e5372caf1d0811e1f2bc87d5deddba171cb09.tar forums-d15e5372caf1d0811e1f2bc87d5deddba171cb09.tar.gz forums-d15e5372caf1d0811e1f2bc87d5deddba171cb09.tar.bz2 forums-d15e5372caf1d0811e1f2bc87d5deddba171cb09.tar.xz forums-d15e5372caf1d0811e1f2bc87d5deddba171cb09.zip |
[ticket/13522] Use acp_get_question_input() for retrieving input data
PHPBB3-13522
Diffstat (limited to 'phpBB/phpbb/captcha')
-rw-r--r-- | phpBB/phpbb/captcha/plugins/qa.php | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/phpBB/phpbb/captcha/plugins/qa.php b/phpBB/phpbb/captcha/plugins/qa.php index 824e6db3b0..3a2652d02c 100644 --- a/phpBB/phpbb/captcha/plugins/qa.php +++ b/phpBB/phpbb/captcha/plugins/qa.php @@ -672,10 +672,7 @@ class qa else { // okay, show the editor - $input_question = request_var('question_text', '', true); - $input_answers = request_var('answers', '', true); - $input_lang = request_var('lang_iso', '', true); - $input_strict = request_var('strict', false); + $question_input = $this->acp_get_question_input(); $langs = $this->get_languages(); foreach ($langs as $lang => $entry) @@ -694,12 +691,12 @@ class qa { if ($question = $this->acp_get_question_data($question_id)) { - $answers = (isset($input_answers[$lang])) ? $input_answers[$lang] : implode("\n", $question['answers']); + $answers = (isset($question_input['answers'][$lang])) ? $question_input['answers'][$lang] : implode("\n", $question['answers']); $template->assign_vars(array( - 'QUESTION_TEXT' => ($input_question) ? $input_question : $question['question_text'], - 'LANG_ISO' => ($input_lang) ? $input_lang : $question['lang_iso'], - 'STRICT' => (isset($_REQUEST['strict'])) ? $input_strict : $question['strict'], + 'QUESTION_TEXT' => ($question_input['question_text']) ? $question_input['question_text'] : $question['question_text'], + 'LANG_ISO' => ($question_input['lang_iso']) ? $question_input['lang_iso'] : $question['lang_iso'], + 'STRICT' => (isset($_REQUEST['strict'])) ? $question_input['strict'] : $question['strict'], 'ANSWERS' => $answers, )); } @@ -711,10 +708,10 @@ class qa else { $template->assign_vars(array( - 'QUESTION_TEXT' => $input_question, - 'LANG_ISO' => $input_lang, - 'STRICT' => $input_strict, - 'ANSWERS' => $input_answers, + 'QUESTION_TEXT' => $question_input['question_text'], + 'LANG_ISO' => $question_input['lang_iso'], + 'STRICT' => $question_input['strict'], + 'ANSWERS' => $question_input['answers'], )); } |