X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialConfirmemail.php;h=a656c2ea112ef0dc09dca9453f724555988513f8;hb=4e618302d9e7b96c008d3dfa3c0554cff52d5222;hp=5ed33e052c4d85584e319ef9d6b33e4eea983aa5;hpb=5a4fdb5b4e82fd68e200a887cac9d4e106fed0af;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialConfirmemail.php b/includes/specials/SpecialConfirmemail.php index 5ed33e052c..a656c2ea11 100644 --- a/includes/specials/SpecialConfirmemail.php +++ b/includes/specials/SpecialConfirmemail.php @@ -56,8 +56,6 @@ class EmailConfirmation extends UnlistedSpecialPage { $this->checkReadOnly(); $this->checkPermissions(); - $this->requireLogin( 'confirmemail_needlogin' ); - // This could also let someone check the current email address, so // require both permissions. if ( !$this->getUser()->isAllowed( 'viewmyprivateinfo' ) ) { @@ -65,6 +63,7 @@ class EmailConfirmation extends UnlistedSpecialPage { } if ( $code === null || $code === '' ) { + $this->requireLogin( 'confirmemail_needlogin' ); if ( Sanitizer::validateEmail( $this->getUser()->getEmail() ) ) { $this->showRequestForm(); } else { @@ -83,17 +82,17 @@ class EmailConfirmation extends UnlistedSpecialPage { $out = $this->getOutput(); if ( !$user->isEmailConfirmed() ) { - $descriptor = array(); + $descriptor = []; if ( $user->isEmailConfirmationPending() ) { - $descriptor += array( - 'pending' => array( + $descriptor += [ + 'pending' => [ 'type' => 'info', 'raw' => true, 'default' => "
\n" . $this->msg( 'confirmemail_pending' )->escaped() . "\n
", - ), - ); + ], + ]; } $out->addWikiMsg( 'confirmemail_text' ); @@ -102,7 +101,7 @@ class EmailConfirmation extends UnlistedSpecialPage { ->setMethod( 'post' ) ->setAction( $this->getPageTitle()->getLocalURL() ) ->setSubmitTextMsg( 'confirmemail_send' ) - ->setSubmitCallback( array( $this, 'submitSend' ) ); + ->setSubmitCallback( [ $this, 'submitSend' ] ); $retval = $form->show();