r82639 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r82638‎ | r82639 | r82640 >
Date:22:51, 22 February 2011
Author:yaron
Status:deferred
Tags:
Comment:
Set wfLoadExtensionMessages() to only be called for MW < 1.16
Modified paths:
  • /trunk/extensions/AdminLinks/AdminLinks_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/AdminLinks/AdminLinks_body.php
@@ -15,7 +15,11 @@
1616 */
1717 function __construct() {
1818 parent::__construct( 'AdminLinks' );
19 - wfLoadExtensionMessages( 'AdminLinks' );
 19+ // deprecated in MW 1.16
 20+ global $wgVersion;
 21+ if ( version_compare( $wgVersion, '1.16', '<' ) ) {
 22+ wfLoadExtensionMessages( 'AdminLinks' );
 23+ }
2024 global $wgUser;
2125 $this->skin = $wgUser->getSkin();
2226 }
@@ -85,7 +89,11 @@
8690 global $wgUser;
8791 // if user is a sysop, add link
8892 if ( $wgUser->isAllowed( 'adminlinks' ) ) {
89 - wfLoadExtensionMessages( 'AdminLinks' );
 93+ // deprecated in MW 1.16
 94+ global $wgVersion;
 95+ if ( version_compare( $wgVersion, '1.16', '<' ) ) {
 96+ wfLoadExtensionMessages( 'AdminLinks' );
 97+ }
9098 $al = SpecialPage::getTitleFor( 'AdminLinks' );
9199 $href = $al->getLocalURL();
92100 $admin_links_vals = array(

Status & tagging log