Index: trunk/phase3/includes/SpecialConfirmemail.php |
— | — | @@ -1,31 +1,29 @@ |
2 | 2 | <?php |
3 | 3 | |
4 | 4 | /** |
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 | | -/** |
15 | 5 | * Special page allows users to request email confirmation message, and handles |
16 | 6 | * processing of the confirmation code when the link in the email is followed |
17 | 7 | * |
18 | 8 | * @addtogroup SpecialPage |
19 | 9 | * @author Rob Church <robchur@gmail.com> |
20 | 10 | */ |
21 | | -class EmailConfirmation extends SpecialPage { |
| 11 | +class EmailConfirmation extends UnlistedSpecialPage { |
22 | 12 | |
23 | 13 | /** |
| 14 | + * Constructor |
| 15 | + */ |
| 16 | + public function __construct() { |
| 17 | + parent::__construct( 'Confirmemail' ); |
| 18 | + } |
| 19 | + |
| 20 | + /** |
24 | 21 | * Main execution point |
25 | 22 | * |
26 | 23 | * @param $code Confirmation code passed to the page |
27 | 24 | */ |
28 | 25 | function execute( $code ) { |
29 | 26 | global $wgUser, $wgOut; |
| 27 | + $this->setHeaders(); |
30 | 28 | if( empty( $code ) ) { |
31 | 29 | if( $wgUser->isLoggedIn() ) { |
32 | 30 | if( User::isValidEmailAddr( $wgUser->getEmail() ) ) { |
Index: trunk/phase3/includes/SpecialPage.php |
— | — | @@ -178,7 +178,7 @@ |
179 | 179 | } |
180 | 180 | |
181 | 181 | if( $wgEmailAuthentication ) { |
182 | | - self::$mList['Confirmemail'] = array( 'UnlistedSpecialPage', 'Confirmemail' ); |
| 182 | + self::$mList['Confirmemail'] = 'EmailConfirmation'; |
183 | 183 | } |
184 | 184 | |
185 | 185 | # Add extension special pages |