From 20fb3d04d4cb376afe931d78b8951350d0975165 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sat, 18 Sep 2010 18:23:27 +0200 Subject: FunnyQuestion: Fix i18n bug --- extensions/FunnyQuestion/FunnyQuestion.body.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'extensions/FunnyQuestion/FunnyQuestion.body.php') 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 .= '
@@ -128,4 +128,3 @@ class FunnyQuestion { } ?> - -- cgit v1.2.3-54-g00ecf