r83542 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r83541‎ | r83542 | r83543 >
Date:20:10, 8 March 2011
Author:nikerabbit
Status:ok
Tags:
Comment:
Restore compatibility with 1.16&1.17
Modified paths:
  • /trunk/extensions/Translate/specials/SpecialLanguageStats.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/specials/SpecialLanguageStats.php
@@ -399,7 +399,13 @@
400400
401401 protected function getGroupDescription( $group ) {
402402 global $wgLang;
403 - return MessageCache::singleton()->transform( $group->getDescription(), true, $wgLang, $this->getTitle() );
 403+ if ( method_exists( 'MessageCache', 'singleton' ) ) {
 404+ $cache = MessageCache::singleton();
 405+ } else {
 406+ global $wgMessageCache;
 407+ $cache = $wgMessageCache;
 408+ }
 409+ return $cache->transform( $group->getDescription(), true, $wgLang, $this->getTitle() );
404410 }
405411
406412 protected function isBlacklisted( $groupId, $code ) {

Status & tagging log