| Index: branches/RL2/extensions/Gadgets/Gadgets.hooks.php |
| — | — | @@ -329,7 +329,7 @@ |
| 330 | 330 | } |
| 331 | 331 | |
| 332 | 332 | // Add preferences JS if we're on Special:Preferences |
| 333 | | - if ( $out->getTitle()->equals( SpecialPage::getTitleFor( 'Preferences' ) ) ) { |
| | 333 | + if ( $out->getTitle()->isSpecial( 'Preferences' ) ) { |
| 334 | 334 | $out->addModules( 'ext.gadgets.preferences' ); |
| 335 | 335 | } |
| 336 | 336 | |
| — | — | @@ -347,9 +347,7 @@ |
| 348 | 348 | $user = $out->getUser(); |
| 349 | 349 | // FIXME: This is not a nice way to do it. Maybe we should check for the presence |
| 350 | 350 | // of a module instead or something. |
| 351 | | - if ( $title->equals( SpecialPage::getTitleFor( 'Gadgets' ) ) || |
| 352 | | - $title->equals( SpecialPage::getTitleFor( 'Preferences' ) ) ) |
| 353 | | - { |
| | 351 | + if ( $title->isSpecial( 'Gadgets' ) || $title->isSpecial( 'Preferences' ) ) { |
| 354 | 352 | global $wgGadgetEnableSharing; |
| 355 | 353 | |
| 356 | 354 | // Pass the source data for each source that is used by a repository |