From 08c7c17b576fc6da867c59bfd0abe2c7ecbd74be Mon Sep 17 00:00:00 2001 From: Daniel Friesen Date: Wed, 27 Aug 2008 14:47:41 +0000 Subject: [PATCH] Fix a minor regression pointed out by aaron. The spacer for between the preview area and the edit toolbar was being outputted even when not previewing. --- includes/EditPage.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/includes/EditPage.php b/includes/EditPage.php index c5910c3d58..25c3d4c30a 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -1290,9 +1290,7 @@ class EditPage { $wgOut->addHTML( $this->editFormPageTop ); if ( $wgUser->getOption( 'previewontop' ) ) { - $this->displayPreviewArea( $previewOutput ); - // Spacer for the edit toolbar - $wgOut->addHTML( '


' ); + $this->displayPreviewArea( $previewOutput, true ); } @@ -1462,7 +1460,7 @@ END $wgOut->addHTML( $this->editFormTextBottom ); $wgOut->addHTML( "\n" ); if ( !$wgUser->getOption( 'previewontop' ) ) { - $this->displayPreviewArea( $previewOutput ); + $this->displayPreviewArea( $previewOutput, false ); } wfProfileOut( $fname ); @@ -1515,10 +1513,12 @@ END $attribs ) ); } - protected function displayPreviewArea( $previewOutput ) { + protected function displayPreviewArea( $previewOutput, $isOnTop = false ) { global $wgOut; if ( $this->formtype == 'preview') { $this->showPreview( $previewOutput ); + // Spacer for the edit toolbar + $wgOut->addHTML( '


' ); } else { $wgOut->addHTML( '
' ); } -- 2.20.1