pass Language to wfMessage() calls
authorAlexandre Emsenhuber <ialex.wiki@gmail.com>
Sat, 7 Jul 2012 16:37:31 +0000 (18:37 +0200)
committerAntoine Musso <hashar@free.fr>
Mon, 9 Jul 2012 12:37:18 +0000 (14:37 +0200)
Pass the Language object to the wfMessage calls in
LogPage::getTitleLink() and LogPage::formatBlockFlags().

Change-Id: I4f8347d6616ee0e6be31b268679b398e108680c0

includes/logging/LogPage.php

index 3891f34..9bb7eb1 100644 (file)
@@ -417,7 +417,8 @@ class LogPage {
                                        # Use the language name for log titles, rather than Log/X
                                        if( $name == 'Log' ) {
                                                $titleLink = Linker::link( $title, LogPage::logName( $par ) );
-                                               $titleLink = wfMessage( 'parentheses' )->rawParams( $titleLink )->escaped();
+                                               $titleLink = wfMessage( 'parentheses' )->inLanguage( $lang )
+                                                       ->rawParams( $titleLink )->escaped();
                                        } else {
                                                $titleLink = Linker::link( $title );
                                        }
@@ -551,7 +552,8 @@ class LogPage {
                        for( $i = 0; $i < count( $flags ); $i++ ) {
                                $flags[$i] = self::formatBlockFlag( $flags[$i], $lang );
                        }
-                       return wfMessage( 'parentheses' )->rawParams( $lang->commaList( $flags ) )->escaped();
+                       return wfMessage( 'parentheses' )->inLanguage( $lang )
+                               ->rawParams( $lang->commaList( $flags ) )->escaped();
                } else {
                        return '';
                }