Merge "Update the Chinese conversion table for Chinese WikiProjects"
[lhc/web/wiklou.git] / includes / specials / SpecialChangeEmail.php
index 12bbd2a..674cbc8 100644 (file)
@@ -39,7 +39,7 @@ class SpecialChangeEmail extends FormSpecialPage {
        /**
         * @return bool
         */
-       function isListed() {
+       public function isListed() {
                global $wgAuth;
 
                return $wgAuth->allowPropChange( 'emailaddress' );
@@ -54,7 +54,7 @@ class SpecialChangeEmail extends FormSpecialPage {
                $out->disallowUserJs();
                $out->addModules( 'mediawiki.special.changeemail' );
 
-               return parent::execute( $par );
+               parent::execute( $par );
        }
 
        protected function checkExecutePermissions( User $user ) {
@@ -106,11 +106,13 @@ class SpecialChangeEmail extends FormSpecialPage {
                return $fields;
        }
 
+       protected function getDisplayFormat() {
+               return 'vform';
+       }
+
        protected function alterForm( HTMLForm $form ) {
-               $form->setDisplayFormat( 'vform' );
                $form->setId( 'mw-changeemail-form' );
                $form->setTableId( 'mw-changeemail-table' );
-               $form->setWrapperLegend( false );
                $form->setSubmitTextMsg( 'changeemail-submit' );
                $form->addHiddenFields( $this->getRequest()->getValues( 'returnto', 'returntoquery' ) );
        }
@@ -149,7 +151,7 @@ class SpecialChangeEmail extends FormSpecialPage {
         * @param string $newaddr
         * @return Status
         */
-       protected function attemptChange( User $user, $pass, $newaddr ) {
+       private function attemptChange( User $user, $pass, $newaddr ) {
                global $wgAuth;
 
                if ( $newaddr != '' && !Sanitizer::validateEmail( $newaddr ) ) {
@@ -183,7 +185,7 @@ class SpecialChangeEmail extends FormSpecialPage {
                        return $status;
                }
 
-               wfRunHooks( 'PrefsEmailAudit', array( $user, $oldaddr, $newaddr ) );
+               Hooks::run( 'PrefsEmailAudit', array( $user, $oldaddr, $newaddr ) );
 
                $user->saveSettings();