diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2010-09-18 18:23:27 +0200 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2010-09-18 18:23:27 +0200 |
commit | 20fb3d04d4cb376afe931d78b8951350d0975165 (patch) | |
tree | c8921dad6ce455215ca8d959fd27e2cc9e3415ce /extensions/FunnyQuestion/FunnyQuestion.body.php | |
parent | 494e797fd6857f9a71bd5da7b53a1754500332fd (diff) |
FunnyQuestion: Fix i18n bug
Diffstat (limited to 'extensions/FunnyQuestion/FunnyQuestion.body.php')
-rw-r--r-- | extensions/FunnyQuestion/FunnyQuestion.body.php | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/extensions/FunnyQuestion/FunnyQuestion.body.php b/extensions/FunnyQuestion/FunnyQuestion.body.php index 2bfb9343..ae0a25ab 100644 --- a/extensions/FunnyQuestion/FunnyQuestion.body.php +++ b/extensions/FunnyQuestion/FunnyQuestion.body.php @@ -8,9 +8,9 @@ class FunnyQuestion { } private static function getLang() { - global $wgLang; + global $wgLang, $wgFunnyQuestions; - return (!empty($wgFunnyQuestions[$wgLang->getCode()]) ? $wgFunnyQuestions[$wgLang->getCode()] : 'en'); + return (!empty($wgFunnyQuestions[$wgLang->getCode()]) ? $wgLang->getCode() : 'en'); } private static function getFunnyQuestion() { @@ -20,7 +20,7 @@ class FunnyQuestion { $time = time(); # make sure the user is not able to tell us the question to answer $hash = sha1($time.$question.$wgFunnyQuestionHash); - + return array('question' => $question, 'time' => $time, 'hash' => $hash); } @@ -85,7 +85,7 @@ class FunnyQuestion { if (!$wgUser->isLoggedIn() && !self::hasFunnyCookie()) { $funnyQuestion = self::getFunnyQuestion(); - $editpage->editFormTextAfterWarn .= + $editpage->editFormTextAfterWarn .= '<div class="editOptions"> <label for="FunnyAnswerField"><strong>' .wfMsg('question-'.sha1($funnyQuestion['question'])).'</strong></label> @@ -128,4 +128,3 @@ class FunnyQuestion { } ?> - |