r24590 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r24589‎ | r24590 | r24591 >
Date:16:43, 4 August 2007
Author:brion
Status:old
Tags:
Comment:
tweak
Modified paths:
  • /trunk/extensions/CentralAuth/SpecialMergeAccount.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CentralAuth/SpecialMergeAccount.php
@@ -213,6 +213,9 @@
214214 }
215215
216216 $passwords = $this->getWorkingPasswords();
 217+ if( empty( $passwords ) ) {
 218+ throw new MWException( "Submission error -- invalid input" );
 219+ }
217220
218221 $home = false;
219222 $attached = array();
@@ -222,10 +225,12 @@
223226
224227 if( $ok ) {
225228 $wgOut->setPageTitle( wfMsg( 'centralauth-complete' ) );
226 - $wgOut->addWikiText( wfMsg( 'centralauth-complete-text' ) );
 229+ //$wgOut->addWikiText( wfMsg( 'centralauth-complete-text' ) );
227230 } else {
228 - $wgOut->addHtml('boo it failed');
 231+ $wgOut->setPageTitle( wfMsg( 'centralauth-incomplete' ) );
 232+ //$wgOut->addWikiText( wfMsg( 'centralauth-incomplete-text' ) );
229233 }
 234+ $this->showCleanupForm();
230235 }
231236
232237 function doCleanupMerge() {
@@ -242,6 +247,7 @@
243248 $attached = array();
244249 $unattached = array();
245250 $ok = $globalUser->attemptPasswordMigration( $password, $attached, $unattached );
 251+ $this->clearWorkingPasswords();
246252
247253 if( $ok ) {
248254 $wgOut->setPageTitle( wfMsg( 'centralauth-complete' ) );
@@ -252,9 +258,8 @@
253259 } else {
254260 $wgOut->addWikiText( "Did some but incomplete still." );
255261 }
256 - $this->showCleanupForm();
257262 }
258 - $this->clearWorkingPasswords();
 263+ $this->showCleanupForm();
259264 }
260265
261266 private function showWelcomeForm() {

Status & tagging log