From 8ab73061ce942ad7aef1c63817fb128c20de13b5 Mon Sep 17 00:00:00 2001 From: Derk-Jan Hartman Date: Mon, 24 Aug 2015 22:58:33 +0200 Subject: [PATCH] EditPage: Add text placeholders to view source page These placeholders are already in use by the edit form, but were not available to extensions. This gives us equal oppertunity to adapt the contents surrounding the source textbox as we have in the editform. I'm reusing the same placeholders. Most extensions fill these placeholders through the showEditForm:initial hook however, so it should not cause too many unexpected changes, since the readonly page uses showReadOnlyForm:initial instead. I left out those that were very specific to the editpage (afterEditTools etc). This will be useful for Bug T110050. Change-Id: Ia03265a907212ee7bac1b839dcdd4d2f24c79bbe --- includes/EditPage.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/includes/EditPage.php b/includes/EditPage.php index 85a30147f3..05e0ac0ee9 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -655,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( "
\n" ); @@ -668,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 ); } -- 2.20.1