Index: trunk/extensions/CentralAuth/SpecialMergeAccount.php |
— | — | @@ -213,6 +213,9 @@ |
214 | 214 | } |
215 | 215 | |
216 | 216 | $passwords = $this->getWorkingPasswords(); |
| 217 | + if( empty( $passwords ) ) { |
| 218 | + throw new MWException( "Submission error -- invalid input" ); |
| 219 | + } |
217 | 220 | |
218 | 221 | $home = false; |
219 | 222 | $attached = array(); |
— | — | @@ -222,10 +225,12 @@ |
223 | 226 | |
224 | 227 | if( $ok ) { |
225 | 228 | $wgOut->setPageTitle( wfMsg( 'centralauth-complete' ) ); |
226 | | - $wgOut->addWikiText( wfMsg( 'centralauth-complete-text' ) ); |
| 229 | + //$wgOut->addWikiText( wfMsg( 'centralauth-complete-text' ) ); |
227 | 230 | } else { |
228 | | - $wgOut->addHtml('boo it failed'); |
| 231 | + $wgOut->setPageTitle( wfMsg( 'centralauth-incomplete' ) ); |
| 232 | + //$wgOut->addWikiText( wfMsg( 'centralauth-incomplete-text' ) ); |
229 | 233 | } |
| 234 | + $this->showCleanupForm(); |
230 | 235 | } |
231 | 236 | |
232 | 237 | function doCleanupMerge() { |
— | — | @@ -242,6 +247,7 @@ |
243 | 248 | $attached = array(); |
244 | 249 | $unattached = array(); |
245 | 250 | $ok = $globalUser->attemptPasswordMigration( $password, $attached, $unattached ); |
| 251 | + $this->clearWorkingPasswords(); |
246 | 252 | |
247 | 253 | if( $ok ) { |
248 | 254 | $wgOut->setPageTitle( wfMsg( 'centralauth-complete' ) ); |
— | — | @@ -252,9 +258,8 @@ |
253 | 259 | } else { |
254 | 260 | $wgOut->addWikiText( "Did some but incomplete still." ); |
255 | 261 | } |
256 | | - $this->showCleanupForm(); |
257 | 262 | } |
258 | | - $this->clearWorkingPasswords(); |
| 263 | + $this->showCleanupForm(); |
259 | 264 | } |
260 | 265 | |
261 | 266 | private function showWelcomeForm() { |