Index: trunk/extensions/CentralNotice/SpecialNoticeText.php |
— | — | @@ -159,10 +159,12 @@ |
160 | 160 | |
161 | 161 | private function getMessage( $msg, $params = array() ) { |
162 | 162 | // A god-damned dirty hack! :D |
163 | | - global $wgSitename; |
164 | 163 | $old = array(); |
165 | | - $old['wgSitename'] = $wgSitename; |
| 164 | + $old['wgSitename'] = $GLOBALS['wgSitename']; |
| 165 | + $old['wgLang'] = $GLOBALS['wgLang']; |
| 166 | + |
166 | 167 | $wgSitename = $this->projectName(); |
| 168 | + $wgLang = Language::factory( $this->language ); // hack for {{int:...}} |
167 | 169 | |
168 | 170 | $options = array( |
169 | 171 | 'language' => $this->language, |
— | — | @@ -173,7 +175,8 @@ |
174 | 176 | $out = call_user_func_array( 'wfMsgExt', $params ); |
175 | 177 | |
176 | 178 | // Restore globals |
177 | | - $wgSitename = $old['wgSitename']; |
| 179 | + $GLOBALS['wgSitename'] = $old['wgSitename']; |
| 180 | + $GLOBALS['wgLang'] = $wgLang; |
178 | 181 | |
179 | 182 | return $out; |
180 | 183 | } |