Index: branches/RL2/extensions/Gadgets/GadgetHooks.php |
— | — | @@ -20,7 +20,7 @@ |
21 | 21 | */ |
22 | 22 | public static function getIDFromTitle( Title $title ) { |
23 | 23 | $id = $title->getText(); |
24 | | - if ( $title->getNamespace() !== NS_GADGET_DEFINITION || !preg_match( '!\.js$!u', $name ) ) { |
| 24 | + if ( $title->getNamespace() !== NS_GADGET_DEFINITION || !preg_match( '!\.js$!u', $id ) ) { |
25 | 25 | // Not a gadget definition page |
26 | 26 | return null; |
27 | 27 | } |