r94390 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r94389‎ | r94390 | r94391 >
Date:22:12, 12 August 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
cleanup and fix
Modified paths:
  • /trunk/extensions/SemanticSignup/includes/SES_Special.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticSignup/includes/SES_Special.php
@@ -75,14 +75,19 @@
7676
7777 global $wgLoginLanguageSelector;
7878 $language = $this->mUserDataChecker->mLanguage;
79 - if( $wgLoginLanguageSelector && $language )
 79+
 80+ if( $wgLoginLanguageSelector && $language ) {
8081 $user->setOption( 'language', $language );
 82+ }
8183
8284 global $wgEmailAuthentication;
83 - if( $wgEmailAuthentication && User::isValidEmailAddr( $user->getEmail() ) ){
84 - $err = $user->sendConfirmationMail();
85 - if (WikiError::isError($err))
86 - throw new Exception(wfMsg('emailfailed'));
 85+
 86+ if( $wgEmailAuthentication && User::isValidEmailAddr( $user->getEmail() ) ) {
 87+ $status = $user->sendConfirmationMail();
 88+
 89+ if ( !$status->isGood() ) {
 90+ throw new Exception( wfMsg( 'emailfailed' ) . "\n" . $status->getMessage() );
 91+ }
8792 }
8893
8994 $user->saveSettings();
@@ -128,7 +133,7 @@
129134 $form_definition = $form->getContent();
130135
131136 global $sfgFormPrinter;
132 - //var_dump($sfgFormPrinter);exit;
 137+
133138 list ($form_text, $javascript_text, $data_text, $form_page_title, $generated_page_name) =
134139 $sfgFormPrinter->formHTML($form_definition, false, false);
135140