http://www.mediawiki.org/wiki/Special:Code/MediaWiki/56300
Revision: 56300
Author: aaron
Date: 2009-09-14 13:39:25 +0000 (Mon, 14 Sep 2009)
Log Message:
-----------
delay message loading
Modified Paths:
--------------
trunk/extensions/ConfirmAccount/RequestAccount_body.php
Modified: trunk/extensions/ConfirmAccount/RequestAccount_body.php
===================================================================
--- trunk/extensions/ConfirmAccount/RequestAccount_body.php 2009-09-14
13:05:12 UTC (rev 56299)
+++ trunk/extensions/ConfirmAccount/RequestAccount_body.php 2009-09-14
13:39:25 UTC (rev 56300)
@@ -5,10 +5,6 @@
exit( 1 );
}
-# FIXME: delay loading
-# Add messages
-wfLoadExtensionMessages( 'ConfirmAccount' );
-
class RequestAccountPage extends SpecialPage {
function __construct() {
@@ -28,7 +24,9 @@
$wgOut->readOnlyPage();
return;
}
-
+ # Load UI messages
+ wfLoadExtensionMessages( 'ConfirmAccount' );
+
$this->setHeaders();
$this->mRealName = trim( $wgRequest->getText( 'wpRealName' ) );
@@ -86,6 +84,7 @@
$this->mForgotAttachment = $forgotFile;
+ wfLoadExtensionMessages( 'ConfirmAccount' ); // Load UI messages
$wgOut->setPagetitle( wfMsgHtml( "requestaccount" ) );
# Output failure message if any
if ( $msg ) {
@@ -223,6 +222,7 @@
protected function doSubmit() {
global $wgOut, $wgUser, $wgAuth, $wgAccountRequestThrottle;
+ wfLoadExtensionMessages( 'ConfirmAccount' ); // Load UI messages
# Now create a dummy user ($u) and check if it is valid
$name = trim( $this->mUsername );
$u = User::newFromName( $name, 'creatable' );
@@ -491,18 +491,19 @@
*/
protected function throttleHit( $limit ) {
global $wgOut;
+ wfLoadExtensionMessages( 'ConfirmAccount' ); // Load UI messages
$wgOut->addHTML( wfMsgExt( 'acct_request_throttle_hit', array(
'parsemag' ), $limit ) );
}
protected function confirmEmailToken( $code ) {
- global $wgUser, $wgOut;
+ global $wgUser, $wgOut, $wgConfirmAccountContact;
+ wfLoadExtensionMessages( 'ConfirmAccount' ); // Load UI messages
# Confirm if this token is in the pending requests
$name = $this->requestFromEmailToken( $code );
if ( $name !== false ) {
# Send confirmation email to prospective user
$this->confirmEmail( $name );
- # Send mail to admin after e-mail has been confirmed;
- global $wgConfirmAccountContact;
+ # Send mail to admin after e-mail has been confirmed
if ( $wgConfirmAccountContact ) {
$u = User::newFromName( $name, 'creatable' );
$u->setEmail( $wgConfirmAccountContact );
@@ -578,6 +579,7 @@
protected function sendConfirmationMail( $user, $token, $expiration ) {
global $wgContLang;
$url = $this->confirmationTokenUrl( $token );
+ wfLoadExtensionMessages( 'ConfirmAccount' ); // Load UI messages
return $user->sendMail( wfMsg( 'requestaccount-email-subj' ),
wfMsg( 'requestaccount-email-body',
wfGetIP(),
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs