Show password-required message only if $wgRequirePasswordforEmailChange = true
[lhc/web/wiklou.git] / includes / specials / SpecialChangeEmail.php
index 65fa01f..361b7b1 100644 (file)
@@ -116,6 +116,11 @@ class SpecialChangeEmail extends FormSpecialPage {
                $form->setTableId( 'mw-changeemail-table' );
                $form->setSubmitTextMsg( 'changeemail-submit' );
                $form->addHiddenFields( $this->getRequest()->getValues( 'returnto', 'returntoquery' ) );
+
+               $form->addHeaderText( $this->msg( 'changeemail-header' )->parseAsBlock() );
+               if ( $this->getConfig()->get( 'RequirePasswordforEmailChange' ) ) {
+                       $form->addHeaderText( $this->msg( 'changeemail-passwordrequired' )->parseAsBlock() );
+               }
        }
 
        public function onSubmit( array $data ) {