Index: branches/RL2/extensions/Gadgets/Gadgets.hooks.php |
— | — | @@ -19,7 +19,7 @@ |
20 | 20 | * @return string Gadget id or null if not a gadget definition page |
21 | 21 | */ |
22 | 22 | public static function getIDFromTitle( Title $title ) { |
23 | | - $id = $title->getDBKey(); |
| 23 | + $id = $title->getText(); |
24 | 24 | if ( $title->getNamespace() !== NS_GADGET_DEFINITION || !preg_match( '!\.js$!u', $id ) ) { |
25 | 25 | // Not a gadget definition page |
26 | 26 | return null; |
— | — | @@ -418,7 +418,7 @@ |
419 | 419 | |
420 | 420 | public static function titleIsCssOrJsPage( $title, &$result ) { |
421 | 421 | if ( ( $title->getNamespace() == NS_GADGET || $title->getNamespace() == NS_GADGET_DEFINITION ) && |
422 | | - preg_match( '!\.(css|js)$!u', $title->getDBKey() ) ) |
| 422 | + preg_match( '!\.(css|js)$!u', $title->getText() ) ) |
423 | 423 | { |
424 | 424 | $result = true; |
425 | 425 | } |