Index: trunk/extensions/SignupAPI/SignupAPI.php |
— | — | @@ -67,10 +67,6 @@ |
68 | 68 | |
69 | 69 | # Hooks |
70 | 70 | |
71 | | -if ( $wgSignupAPIUseAjax ) { |
72 | | - $wgHooks['SignupForm'][] = 'SignupAPIHooks::onSignupAPIUseAjax'; |
73 | | -} |
74 | | - |
75 | 71 | if ( $wgSignupAPISourceTracking ) { |
76 | 72 | |
77 | 73 | // Schema updates for update.php |
Index: trunk/extensions/SignupAPI/includes/SignupAPI.hooks.php |
— | — | @@ -8,13 +8,7 @@ |
9 | 9 | |
10 | 10 | class SignupAPIHooks { |
11 | 11 | |
12 | | - function onSignupAPIUseAjax() { |
13 | | - global $wgOut; |
14 | | - $wgOut->addModules( 'ext.SignupAPI' ); |
15 | | - return true; |
16 | | - } |
17 | | - |
18 | | - function onSourceTracking() { |
| 12 | + static function onSourceTracking() { |
19 | 13 | global $wgExtNewTables; |
20 | 14 | |
21 | 15 | $wgExtNewTables[] = array( |
— | — | @@ -24,7 +18,7 @@ |
25 | 19 | return true; |
26 | 20 | } |
27 | 21 | |
28 | | - function addSourceTracking( &$personal_urls, &$title ) { |
| 22 | + static function addSourceTracking( &$personal_urls, &$title ) { |
29 | 23 | global $wgRequest, $wgUser, $wgServer, $wgSecureLogin; |
30 | 24 | |
31 | 25 | // Generate source tracking parameters |
Index: trunk/extensions/SignupAPI/includes/SpecialUserSignup.php |
— | — | @@ -128,6 +128,7 @@ |
129 | 129 | } |
130 | 130 | |
131 | 131 | public function execute( $par ) { |
| 132 | + global $wgOut; |
132 | 133 | |
133 | 134 | if ( session_id() == '' ) { |
134 | 135 | wfSetupSession(); |
— | — | @@ -137,6 +138,12 @@ |
138 | 139 | $this->mType = 'signup'; |
139 | 140 | } |
140 | 141 | |
| 142 | + // Ajax-ify ? |
| 143 | + if ( $wgSignupAPIUseAjax ) { |
| 144 | + $wgOut->addModules( 'ext.SignupAPI' ); |
| 145 | + } |
| 146 | + |
| 147 | + |
141 | 148 | if ( !is_null( $this->mCookieCheck ) ) { |
142 | 149 | $this->onCookieRedirectCheck( $this->mCookieCheck ); |
143 | 150 | return; |