r22829 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r22828‎ | r22829 | r22830 >
Date:00:52, 8 June 2007
Author:robchurch
Status:old
Tags:
Comment:
Ditch wfSpecialConfirmemail(), move Special:Confirmemail to the modern special page loading scheme
Modified paths:
  • /trunk/phase3/includes/SpecialConfirmemail.php (modified) (history)
  • /trunk/phase3/includes/SpecialPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialConfirmemail.php
@@ -1,31 +1,29 @@
22 <?php
33
44 /**
5 - * Main execution point
6 - *
7 - * @param $par Parameters passed to the page
8 - */
9 -function wfSpecialConfirmemail( $par ) {
10 - $form = new EmailConfirmation();
11 - $form->execute( $par );
12 -}
13 -
14 -/**
155 * Special page allows users to request email confirmation message, and handles
166 * processing of the confirmation code when the link in the email is followed
177 *
188 * @addtogroup SpecialPage
199 * @author Rob Church <robchur@gmail.com>
2010 */
21 -class EmailConfirmation extends SpecialPage {
 11+class EmailConfirmation extends UnlistedSpecialPage {
2212
2313 /**
 14+ * Constructor
 15+ */
 16+ public function __construct() {
 17+ parent::__construct( 'Confirmemail' );
 18+ }
 19+
 20+ /**
2421 * Main execution point
2522 *
2623 * @param $code Confirmation code passed to the page
2724 */
2825 function execute( $code ) {
2926 global $wgUser, $wgOut;
 27+ $this->setHeaders();
3028 if( empty( $code ) ) {
3129 if( $wgUser->isLoggedIn() ) {
3230 if( User::isValidEmailAddr( $wgUser->getEmail() ) ) {
Index: trunk/phase3/includes/SpecialPage.php
@@ -178,7 +178,7 @@
179179 }
180180
181181 if( $wgEmailAuthentication ) {
182 - self::$mList['Confirmemail'] = array( 'UnlistedSpecialPage', 'Confirmemail' );
 182+ self::$mList['Confirmemail'] = 'EmailConfirmation';
183183 }
184184
185185 # Add extension special pages

Follow-up revisions

RevisionCommit summaryAuthorDate
r22857Merged revisions 22811-22855 via svnmerge from...david00:48, 9 June 2007

Status & tagging log