X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialChangeEmail.php;h=babb315483e7c2ed52435ea85a906efacf31cf7e;hb=d4cc4117d79648ab5f6d1d3f7dc84b043b073008;hp=eca307d9a1bf94c115ddecf7618a486a5be1c849;hpb=b8f78c331c07efacaedb3d054771e2428280f2ea;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialChangeEmail.php b/includes/specials/SpecialChangeEmail.php index eca307d9a1..babb315483 100644 --- a/includes/specials/SpecialChangeEmail.php +++ b/includes/specials/SpecialChangeEmail.php @@ -92,14 +92,14 @@ class SpecialChangeEmail extends FormSpecialPage { 'NewEmail' => array( 'type' => 'email', 'label-message' => 'changeemail-newemail', + 'autofocus' => true ), ); if ( $this->getConfig()->get( 'RequirePasswordforEmailChange' ) ) { $fields['Password'] = array( 'type' => 'password', - 'label-message' => 'changeemail-password', - 'autofocus' => true, + 'label-message' => 'changeemail-password' ); } @@ -129,7 +129,8 @@ class SpecialChangeEmail extends FormSpecialPage { public function onSuccess() { $request = $this->getRequest(); - $titleObj = Title::newFromText( $request->getVal( 'returnto' ) ); + $returnto = $request->getVal( 'returnto' ); + $titleObj = $returnto !== null ? Title::newFromText( $returnto ) : null; if ( !$titleObj instanceof Title ) { $titleObj = Title::newMainPage(); }