Index: trunk/extensions/UsabilityInitiative/Vector/Vector.php |
— | — | @@ -49,5 +49,5 @@ |
50 | 50 | $wgExtensionMessagesFiles['VectorSimpleSearch'] = dirname( __FILE__ ) . '/Modules/SimpleSearch/SimpleSearch.i18n.php'; |
51 | 51 | |
52 | 52 | // Register Hooks |
53 | | -$wgHooks['AjaxAddScript'][] = 'VectorHooks::addModules'; |
| 53 | +$wgHooks['BeforePageDisplay'][] = 'VectorHooks::addModules'; |
54 | 54 | $wgHooks['GetPreferences'][] = 'VectorHooks::addPreferences'; |
Index: trunk/extensions/UsabilityInitiative/Vector/Vector.hooks.php |
— | — | @@ -61,11 +61,11 @@ |
62 | 62 | */ |
63 | 63 | |
64 | 64 | /** |
65 | | - * AjaxAddScript hook |
| 65 | + * BeforePageDislay hook |
66 | 66 | * Adds the modules to the edit form |
67 | 67 | */ |
68 | | - public static function addModules( &$toolbar ) { |
69 | | - global $wgOut, $wgUser, $wgJsMimeType; |
| 68 | + public static function addModules( &$out, &$sk ) { |
| 69 | + global $wgUser, $wgJsMimeType; |
70 | 70 | global $wgVectorModules, $wgUsabilityInitiativeResourceMode; |
71 | 71 | |
72 | 72 | // Modules |
— | — | @@ -111,7 +111,7 @@ |
112 | 112 | ); |
113 | 113 | } |
114 | 114 | // Preferences (maybe the UsabilityInitiative class could do most of this for us?) |
115 | | - $wgOut->addScript( |
| 115 | + $out->addScript( |
116 | 116 | Xml::tags( |
117 | 117 | 'script', |
118 | 118 | array( 'type' => $wgJsMimeType ), |