From 8847b69f3ffeea7a6a65f5cb2c7a228e18d73e21 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Wed, 9 Apr 2008 22:20:01 +0000 Subject: [PATCH] * (bug 13458) Preview/edit toolbar spacing now works consistently --- RELEASE-NOTES | 1 + includes/EditPage.php | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index e15a5fddea..8a3b51b16a 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -160,6 +160,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 12064) BeforePageDisplay hook is now called for all skins * (bug 13624) Fix regression with manual thumb= parameter on images * (bug 11039) Add missing labels on protection form +* (bug 13458) Preview/edit toolbar spacing now works consistently === API changes in 1.13 === diff --git a/includes/EditPage.php b/includes/EditPage.php index 5d294857d6..47405f1e55 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -1567,7 +1567,7 @@ END $parserOptions->setTidy(true); $parserOptions->enableLimitReport(); - $parserOutput = $wgParser->parse( $this->mArticle->preSaveTransform( $toparse ) ."\n\n", + $parserOutput = $wgParser->parse( $this->mArticle->preSaveTransform( $toparse ), $this->mTitle, $parserOptions ); $previewHTML = $parserOutput->getText(); @@ -1595,9 +1595,16 @@ END if ( $this->isConflict ) { $previewhead.='

' . htmlspecialchars( wfMsg( 'previewconflict' ) ) . "

\n"; } + + if( $wgUser->getOption( 'previewontop' ) ) { + // Spacer for the edit toolbar + $previewfoot = '


'; + } else { + $previewfoot = ''; + } wfProfileOut( $fname ); - return $previewhead . $previewHTML; + return $previewhead . $previewHTML . $previewfoot; } /** -- 2.20.1