summaryrefslogtreecommitdiff
path: root/www/wiki
diff options
context:
space:
mode:
authorYaco <franco@reevo.org>2019-09-09 03:50:43 -0300
committerYaco <franco@reevo.org>2019-09-09 03:50:43 -0300
commit9277314baf159377411739e010e8e46d12185328 (patch)
treebc865538d3c4ff404e4440465fd7396bcba04a38 /www/wiki
parent7723fb706bda6662d899e733b809fcf3dec45389 (diff)
agrega suporte multilenguaje al captcha
Diffstat (limited to 'www/wiki')
-rw-r--r--www/wiki/extensions/ConfirmEdit/QuestyCaptcha/QuestyCaptcha.class.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/www/wiki/extensions/ConfirmEdit/QuestyCaptcha/QuestyCaptcha.class.php b/www/wiki/extensions/ConfirmEdit/QuestyCaptcha/QuestyCaptcha.class.php
index 95da1021..a42992e4 100644
--- a/www/wiki/extensions/ConfirmEdit/QuestyCaptcha/QuestyCaptcha.class.php
+++ b/www/wiki/extensions/ConfirmEdit/QuestyCaptcha/QuestyCaptcha.class.php
@@ -55,6 +55,15 @@ class QuestyCaptcha extends SimpleCaptcha {
*/
function getCaptcha() {
global $wgCaptchaQuestions;
+ global $wgLang;
+ $currentlang = $wgLang->getCode();
+
+ if (array_key_exists($currentlang,$wgCaptchaQuestions)) {
+ $wgCaptchaQuestions = $wgCaptchaQuestions[$currentlang];
+ } else {
+ $default = array_key_first($wgCaptchaQuestions);
+ $wgCaptchaQuestions = $wgCaptchaQuestions[$default];
+ }
// Backwards compatibility
if ( $wgCaptchaQuestions === array_values( $wgCaptchaQuestions ) ) {