Index: trunk/extensions/CentralNotice/BannerLoader.php |
— | — | @@ -128,7 +128,7 @@ |
129 | 129 | $oldLang = $wgLang; |
130 | 130 | |
131 | 131 | $wgLang = Language::factory( $this->language ); // hack for {{int:...}} |
132 | | - $out = wfMsgExt( $msg, array( 'language' => $this->language, 'parsemag' ) ); |
| 132 | + $out = wfMessage( $msg )->inLanguage( $this->language )->text(); |
133 | 133 | |
134 | 134 | // Restore global |
135 | 135 | $wgLang = $oldLang; |
Index: trunk/extensions/CentralNotice/SpecialNoticeTemplate.php |
— | — | @@ -288,7 +288,7 @@ |
289 | 289 | } |
290 | 290 | |
291 | 291 | // Get user's language |
292 | | - $wpUserLang = $wgRequest->getVal( 'wpUserLanguage' ) ? $wgRequest->getVal( 'wpUserLanguage' ) : $wgContLanguageCode; |
| 292 | + $wpUserLang = $wgRequest->getVal( 'wpUserLanguage', $wgLanguageCode ); |
293 | 293 | |
294 | 294 | // Get current banner |
295 | 295 | $currentTemplate = $wgRequest->getText( 'template' ); |
— | — | @@ -319,7 +319,7 @@ |
320 | 320 | // Show preview of banner |
321 | 321 | $render = new BannerLoader(); |
322 | 322 | $render->siteName = 'Wikipedia'; |
323 | | - $render->language = $wgRequest->getVal( 'wpUserLanguage' ); |
| 323 | + $render->language = $wpUserLang; |
324 | 324 | if ( $render->language != '' ) { |
325 | 325 | $htmlOut .= Xml::fieldset( wfMsg( 'centralnotice-preview' ) . " ($render->language)", |
326 | 326 | $render->getHtmlNotice( $wgRequest->getText( 'template' ) ) |