Index: trunk/extensions/AdminLinks/AdminLinks_body.php |
— | — | @@ -15,6 +15,11 @@ |
16 | 16 | */ |
17 | 17 | function __construct() { |
18 | 18 | parent::__construct( 'AdminLinks' ); |
| 19 | + // deprecated in MW 1.16 |
| 20 | + global $wgVersion; |
| 21 | + if ( version_compare( $wgVersion, '1.16', '<' ) ) { |
| 22 | + wfLoadExtensionMessages( 'AdminLinks' ); |
| 23 | + } |
19 | 24 | global $wgUser; |
20 | 25 | $this->skin = $wgUser->getSkin(); |
21 | 26 | } |
— | — | @@ -85,6 +90,11 @@ |
86 | 91 | global $wgUser; |
87 | 92 | // if user is a sysop, add link |
88 | 93 | if ( $wgUser->isAllowed( 'adminlinks' ) ) { |
| 94 | + // deprecated in MW 1.16 |
| 95 | + global $wgVersion; |
| 96 | + if ( version_compare( $wgVersion, '1.16', '<' ) ) { |
| 97 | + wfLoadExtensionMessages( 'AdminLinks' ); |
| 98 | + } |
89 | 99 | $al = SpecialPage::getTitleFor( 'AdminLinks' ); |
90 | 100 | $href = $al->getLocalURL(); |
91 | 101 | $admin_links_vals = array( |
Index: trunk/extensions/ApprovedRevs/ApprovedRevs_body.php |
— | — | @@ -232,4 +232,13 @@ |
233 | 233 | ); |
234 | 234 | $wgOut->addLink( $link ); |
235 | 235 | } |
| 236 | + |
| 237 | + public static function loadMessages() { |
| 238 | + // for backwards compatibility |
| 239 | + global $wgVersion; |
| 240 | + if ( version_compare( $wgVersion, '1.16', '<' ) ) { |
| 241 | + wfLoadExtensionMessages( 'ApprovedRevs' ); |
| 242 | + } |
| 243 | + } |
| 244 | + |
236 | 245 | } |
Index: trunk/extensions/ApprovedRevs/SpecialApprovedRevs.php |
— | — | @@ -13,6 +13,7 @@ |
14 | 14 | */ |
15 | 15 | function __construct() { |
16 | 16 | parent::__construct( 'ApprovedRevs' ); |
| 17 | + ApprovedRevs::loadMessages(); |
17 | 18 | } |
18 | 19 | |
19 | 20 | function execute( $query ) { |
Index: trunk/extensions/ApprovedRevs/ApprovedRevs.hooks.php |
— | — | @@ -171,6 +171,7 @@ |
172 | 172 | } |
173 | 173 | |
174 | 174 | ApprovedRevs::addCSS(); |
| 175 | + ApprovedRevs::loadMessages(); |
175 | 176 | |
176 | 177 | $content = ''; |
177 | 178 | |
— | — | @@ -208,6 +209,7 @@ |
209 | 210 | } |
210 | 211 | |
211 | 212 | ApprovedRevs::addCSS(); |
| 213 | + ApprovedRevs::loadMessages(); |
212 | 214 | if ( $revisionID == $article->getLatest() ) { |
213 | 215 | $text = Xml::element( |
214 | 216 | 'span', |
— | — | @@ -260,6 +262,7 @@ |
261 | 263 | $latestRevID = $title->getLatestRevID(); |
262 | 264 | if ( ! empty( $approvedRevID ) && $approvedRevID != $latestRevID ) { |
263 | 265 | ApprovedRevs::addCSS(); |
| 266 | + ApprovedRevs::loadMessages(); |
264 | 267 | global $wgOut; |
265 | 268 | $wgOut->addHTML( '<p class="approvedRevsEditWarning">' . wfMsg( 'approvedrevs-editwarning' ) . "</p>\n" ); |
266 | 269 | } |
— | — | @@ -279,6 +282,7 @@ |
280 | 283 | $latestRevID = $wgTitle->getLatestRevID(); |
281 | 284 | if ( ! empty( $approvedRevID ) && $approvedRevID != $latestRevID ) { |
282 | 285 | ApprovedRevs::addCSS(); |
| 286 | + ApprovedRevs::loadMessages(); |
283 | 287 | $preFormHTML .= '<p><strong>' . wfMsg( 'approvedrevs-editwarning' ) . "</strong></p>\n"; |
284 | 288 | } |
285 | 289 | return true; |
— | — | @@ -337,6 +341,8 @@ |
338 | 342 | // this will be null if there's no ID |
339 | 343 | $approvedRevID = ApprovedRevs::getApprovedRevID( $article->getTitle() ); |
340 | 344 | $article->approvedRevID = $approvedRevID; |
| 345 | + // also load extension messages, while we're at it |
| 346 | + ApprovedRevs::loadMessages(); |
341 | 347 | return true; |
342 | 348 | } |
343 | 349 | |
Index: trunk/extensions/ReplaceText/SpecialReplaceText.php |
— | — | @@ -6,7 +6,11 @@ |
7 | 7 | * Constructor |
8 | 8 | */ |
9 | 9 | public function __construct() { |
| 10 | + global $wgVersion; |
10 | 11 | parent::__construct( 'ReplaceText', 'replacetext' ); |
| 12 | + if ( version_compare( $wgVersion, '1.16', '<' ) ) { |
| 13 | + wfLoadExtensionMessages( 'ReplaceText' ); |
| 14 | + } |
11 | 15 | } |
12 | 16 | |
13 | 17 | function execute( $query ) { |