1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

[ticket/14241] Prevent empty q&a as a result of improper settings

Improper setup of the q&a captcha in combination with the admin choosing a
default language that does not have any questions and answers set might
result in the user being presented empty questions and answers. This
change will try to fall back to any question in case the admin incorrectly
set the default language and has no questions & answers set. If that does
not work, the captcha will not allow passing it and suggest to contact the
board admin to resolve this issue.

PHPBB3-14241
This commit is contained in:
Marc Alexander
2016-03-11 10:51:07 +01:00
parent 9288a50bcf
commit 4c5c289f75
2 changed files with 25 additions and 3 deletions

View File

@@ -40,6 +40,7 @@ $lang = array_merge($lang, array(
'CAPTCHA_QA' => 'Q&A',
'CONFIRM_QUESTION_EXPLAIN' => 'This question is a means of preventing automated form submissions by spambots.',
'CONFIRM_QUESTION_WRONG' => 'You have provided an invalid answer to the question.',
'CONFIRM_QUESTION_MISSING' => 'Questions for the captcha could not be retrieved. Please contact a board administrator.',
'QUESTION_ANSWERS' => 'Answers',
'ANSWERS_EXPLAIN' => 'Please enter valid answers to the question, one per line.',
@@ -60,5 +61,4 @@ $lang = array_merge($lang, array(
'QA_ERROR_MSG' => 'Please fill in all fields and enter at least one answer.',
'QA_LAST_QUESTION' => 'You cannot delete all questions while the plugin is active.',
));