r114502 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r114501‎ | r114502 | r114503 >
Date:22:46, 26 March 2012
Author:awjrichards
Status:deferred
Tags:
Comment:
MFT Change-Id: I510fe48f5aa7e1de0f2b2155fde02c646c5eeb63
Modified paths:
  • /branches/wmf/1.19wmf1/extensions/MobileFrontend/MobileFrontend.body.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.19wmf1/extensions/MobileFrontend/MobileFrontend.body.php
@@ -269,10 +269,19 @@
270270
271271 $languageUrls = array();
272272
 273+ /**
 274+ * Provide correct method name depending on MW 1.19 or MW 1.20
 275+ */
 276+ if ( method_exists( 'Language', 'fetchLanguageName' )) {
 277+ $langFetchMethodName = 'fetchLanguageName';
 278+ } else {
 279+ $langFetchMethodName = 'getLanguageName';
 280+ }
 281+
273282 $languageUrls[] = array(
274283 'href' => self::$currentURL,
275284 'text' => self::$htmlTitle,
276 - 'language' => Language::fetchLanguageName( $wgLanguageCode ),
 285+ 'language' => Language::$langFetchMethodName( $wgLanguageCode ),
277286 'class' => 'interwiki-' . $wgLanguageCode,
278287 'lang' => $wgLanguageCode,
279288 );
@@ -287,10 +296,10 @@
288297 $languageUrl = $this->getMobileUrl( $nt->getFullURL() );
289298 $languageUrls[] = array(
290299 'href' => $languageUrl,
291 - 'text' => ( Language::fetchLanguageName( $nt->getInterwiki() ) != ''
292 - ? Language::fetchLanguageName( $nt->getInterwiki() )
 300+ 'text' => ( Language::$langFetchMethodName( $nt->getInterwiki() ) != ''
 301+ ? Lanuage::$langFetchMethodName( $nt->getInterwiki() )
293302 : $l ),
294 - 'language' => Language::fetchLanguageName( $lang ),
 303+ 'language' => Language::$langFetchMethodName( $lang ),
295304 'class' => $class,
296305 'lang' => $lang,
297306 );

Status & tagging log