Index: trunk/extensions/Babel/Babel.class.php |
— | — | @@ -301,14 +301,11 @@ |
302 | 302 | */ |
303 | 303 | protected static function mReplaceCategoryVariables( $category, $code ) { |
304 | 304 | global $wgLanguageCode; |
305 | | - $vars = array( |
| 305 | + $category = strtr( $category, array( |
306 | 306 | '%code%' => $code, |
307 | 307 | '%wikiname%' => BabelLanguageCodes::getName( $code, $wgLanguageCode ), |
308 | 308 | '%nativename%' => BabelLanguageCodes::getName( $code ) |
309 | | - ); |
310 | | - foreach ( $vars as $find => $replace ) { |
311 | | - $category = str_replace( $find, $replace, $category ); |
312 | | - } |
| 309 | + ) ); |
313 | 310 | return $category; |
314 | 311 | } |
315 | 312 | |