diff options
Diffstat (limited to 'www/wiki/extensions/ConfirmEdit')
-rw-r--r-- | www/wiki/extensions/ConfirmEdit/QuestyCaptcha/QuestyCaptcha.class.php | 9 |
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 ) ) { |