mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
[ticket/13522] Use acp_get_question_input() for retrieving input data
PHPBB3-13522
This commit is contained in:
parent
12fe882741
commit
d15e5372ca
1 changed files with 9 additions and 12 deletions
|
@ -672,10 +672,7 @@ class qa
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// okay, show the editor
|
// okay, show the editor
|
||||||
$input_question = request_var('question_text', '', true);
|
$question_input = $this->acp_get_question_input();
|
||||||
$input_answers = request_var('answers', '', true);
|
|
||||||
$input_lang = request_var('lang_iso', '', true);
|
|
||||||
$input_strict = request_var('strict', false);
|
|
||||||
$langs = $this->get_languages();
|
$langs = $this->get_languages();
|
||||||
|
|
||||||
foreach ($langs as $lang => $entry)
|
foreach ($langs as $lang => $entry)
|
||||||
|
@ -694,12 +691,12 @@ class qa
|
||||||
{
|
{
|
||||||
if ($question = $this->acp_get_question_data($question_id))
|
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(
|
$template->assign_vars(array(
|
||||||
'QUESTION_TEXT' => ($input_question) ? $input_question : $question['question_text'],
|
'QUESTION_TEXT' => ($question_input['question_text']) ? $question_input['question_text'] : $question['question_text'],
|
||||||
'LANG_ISO' => ($input_lang) ? $input_lang : $question['lang_iso'],
|
'LANG_ISO' => ($question_input['lang_iso']) ? $question_input['lang_iso'] : $question['lang_iso'],
|
||||||
'STRICT' => (isset($_REQUEST['strict'])) ? $input_strict : $question['strict'],
|
'STRICT' => (isset($_REQUEST['strict'])) ? $question_input['strict'] : $question['strict'],
|
||||||
'ANSWERS' => $answers,
|
'ANSWERS' => $answers,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
@ -711,10 +708,10 @@ class qa
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
'QUESTION_TEXT' => $input_question,
|
'QUESTION_TEXT' => $question_input['question_text'],
|
||||||
'LANG_ISO' => $input_lang,
|
'LANG_ISO' => $question_input['lang_iso'],
|
||||||
'STRICT' => $input_strict,
|
'STRICT' => $question_input['strict'],
|
||||||
'ANSWERS' => $input_answers,
|
'ANSWERS' => $question_input['answers'],
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue