Remove dead code after removal of cancel button on Special:ChangeEmail
authorAlexandre Emsenhuber <mediawiki@emsenhuber.ch>
Sat, 27 Sep 2014 18:45:55 +0000 (20:45 +0200)
committerAlexandre Emsenhuber <mediawiki@emsenhuber.ch>
Sat, 27 Sep 2014 18:45:55 +0000 (20:45 +0200)
Since the removal of the cancel button, the "wpCancel" parameter
cannot be present anymore, thus this check is now unneccessary.

Change-Id: Id72b29484554989ce8a639f2e0d3ecc07622edad

includes/specials/SpecialChangeEmail.php

index e0be838..f5df54e 100644 (file)
@@ -116,12 +116,8 @@ class SpecialChangeEmail extends FormSpecialPage {
        }
 
        public function onSubmit( array $data ) {
-               if ( $this->getRequest()->getBool( 'wpCancel' ) ) {
-                       $status = Status::newGood( true );
-               } else {
-                       $password = isset( $data['Password'] ) ? $data['Password'] : null;
-                       $status = $this->attemptChange( $this->getUser(), $password, $data['NewEmail'] );
-               }
+               $password = isset( $data['Password'] ) ? $data['Password'] : null;
+               $status = $this->attemptChange( $this->getUser(), $password, $data['NewEmail'] );
 
                $this->status = $status;