Index: branches/RL2/extensions/Gadgets/SpecialGadgets.php |
— | — | @@ -137,7 +137,7 @@ |
138 | 138 | array( 'action' => 'edit' ) |
139 | 139 | ); |
140 | 140 | } |
141 | | - |
| 141 | + |
142 | 142 | if ( $user->isAllowed( 'gadgets-definition-delete' ) ) { |
143 | 143 | $extra[] = Linker::link( |
144 | 144 | $gadgetDefinitionTitle, |
— | — | @@ -234,7 +234,7 @@ |
235 | 235 | |
236 | 236 | // There is atleast one gadget, let's get started. |
237 | 237 | $out->addWikiMsg( 'gadgets-pagetext', |
238 | | - Title::newFromText( 'Special:Recentchanges/namespace=' . NS_GADGET_DEFINITION )->getPrefixedText() |
| 238 | + SpecialPage::getTitleFor( 'Recentchanges', 'namespace=' . NS_GADGET_DEFINITION )->getPrefixedText() |
239 | 239 | ); |
240 | 240 | |
241 | 241 | // Sort categories alphabetically |
— | — | @@ -338,37 +338,38 @@ |
339 | 339 | $exportTitles = array(); |
340 | 340 | |
341 | 341 | // NS_GADGET_DEFINITION page of this gadget |
342 | | - $exportTitles[] = GadgetsHooks::getDefinitionTitleFromID( $gadget->getId() ); |
| 342 | + $exportTitles[] = GadgetsHooks::getDefinitionTitleFromID( $gadget->getId() ); |
343 | 343 | |
344 | 344 | // Title message in NS_MEDIAWIKI |
345 | | - $exportTitles[] = Title::makeTitleSafe( NS_MEDIAWIKI, $gadget->getTitleMessageKey() ); |
| 345 | + $exportTitles[] = Title::makeTitleSafe( NS_MEDIAWIKI, $gadget->getTitleMessageKey() ); |
346 | 346 | |
347 | 347 | // Translation subpages of title message |
348 | | - // @todo |
| 348 | + // @todo |
349 | 349 | |
350 | 350 | // Description message in NS_MEDIAWIKI |
351 | | - $exportTitles[] = Title::makeTitleSafe( NS_MEDIAWIKI, $gadget->getDescriptionMessageKey() ); |
| 351 | + $exportTitles[] = Title::makeTitleSafe( NS_MEDIAWIKI, $gadget->getDescriptionMessageKey() ); |
352 | 352 | |
353 | 353 | // Translation subpages of description message |
354 | | - // @todo |
| 354 | + // @todo |
355 | 355 | |
356 | 356 | // Module script and styles in NS_GADGET |
357 | | - foreach ( $gadget->getScripts() as $script ) { |
358 | | - $exportTitles[] = Title::makeTitleSafe( NS_GADGET, $script ); |
359 | | - } |
360 | | - foreach ( $gadget->getStyles() as $style ) { |
361 | | - $exportTitles[] = Title::makeTitleSafe( NS_GADGET, $style ); |
362 | | - } |
| 357 | + foreach ( $gadget->getScripts() as $script ) { |
| 358 | + $exportTitles[] = Title::makeTitleSafe( NS_GADGET, $script ); |
| 359 | + } |
363 | 360 | |
| 361 | + foreach ( $gadget->getStyles() as $style ) { |
| 362 | + $exportTitles[] = Title::makeTitleSafe( NS_GADGET, $style ); |
| 363 | + } |
| 364 | + |
364 | 365 | $gadgetModule = $gadget->getModule(); |
365 | 366 | |
366 | 367 | // Module messages in NS_MEDIAWIKI |
367 | | - foreach( $gadgetModule->getMessages() as $message ) { |
368 | | - $exportTitles[] = Title::makeTitleSafe( NS_MEDIAWIKI, $message ); |
369 | | - } |
| 368 | + foreach( $gadgetModule->getMessages() as $message ) { |
| 369 | + $exportTitles[] = Title::makeTitleSafe( NS_MEDIAWIKI, $message ); |
| 370 | + } |
370 | 371 | |
371 | 372 | // Translation subpages of module messages |
372 | | - // @todo |
| 373 | + // @todo |
373 | 374 | |
374 | 375 | // Build line-break separated string of prefixed titles |
375 | 376 | $exportList = ''; |
— | — | @@ -416,7 +417,7 @@ |
417 | 418 | } |
418 | 419 | |
419 | 420 | /** |
420 | | - * Exports a gadget with its dependencies in a serialized form. |
| 421 | + * Handles [[Special:Gadgets/id]]. |
421 | 422 | * Should not be called if the gadget does not exist. $gadget must be |
422 | 423 | * an instance of Gadget, not null. |
423 | 424 | * @param $gadget Gadget |