Merge "Add tests for WikiMap and WikiReference"
[lhc/web/wiklou.git] / includes / EditPage.php
index f3a41c4..05e0ac0 100644 (file)
@@ -527,7 +527,10 @@ class EditPage {
                if ( $permErrors ) {
                        wfDebug( __METHOD__ . ": User can't edit\n" );
                        // Auto-block user's IP if the account was "hard" blocked
-                       $wgUser->spreadAnyEditBlock();
+                       $user = $wgUser;
+                       DeferredUpdates::addCallableUpdate( function() use ( $user ) {
+                               $user->spreadAnyEditBlock();
+                       } );
 
                        $this->displayPermissionsError( $permErrors );
 
@@ -652,6 +655,9 @@ class EditPage {
                        $this->getContextTitle()->getPrefixedText()
                ) );
                $wgOut->addBacklinkSubtitle( $this->getContextTitle() );
+               $wgOut->addHTML( $this->editFormPageTop );
+               $wgOut->addHTML( $this->editFormTextTop );
+
                $wgOut->addWikiText( $wgOut->formatPermissionsErrorMessage( $permErrors, 'edit' ) );
                $wgOut->addHTML( "<hr />\n" );
 
@@ -665,13 +671,16 @@ class EditPage {
                        $wgOut->addWikiMsg( 'viewsourcetext' );
                }
 
+               $wgOut->addHTML( $this->editFormTextBeforeContent );
                $this->showTextbox( $text, 'wpTextbox1', array( 'readonly' ) );
+               $wgOut->addHTML( $this->editFormTextAfterContent );
 
                $wgOut->addHTML( Html::rawElement( 'div', array( 'class' => 'templatesUsed' ),
                        Linker::formatTemplates( $this->getTemplates() ) ) );
 
                $wgOut->addModules( 'mediawiki.action.edit.collapsibleFooter' );
 
+               $wgOut->addHTML( $this->editFormTextBottom );
                if ( $this->mTitle->exists() ) {
                        $wgOut->returnToMain( null, $this->mTitle );
                }