From 4a2641f4e5510c3798a589b91e7529d81b065283 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Niklas=20Laxstr=C3=B6m?= Date: Sun, 28 Sep 2008 14:56:07 +0000 Subject: [PATCH] * user{css,js}preview was not shown since r40066 * readd !preview condition to usercssjsyoucanpreview --- includes/EditPage.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/includes/EditPage.php b/includes/EditPage.php index 40cf39a1cc..f11affca2f 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -1178,7 +1178,9 @@ class EditPage { if ( $this->isCssJsSubpage ) { # Check the skin exists if ( $this->isValidCssJsSubpage ) { - $wgOut->addWikiMsg( 'usercssjsyoucanpreview' ); + if ( $this->formtype !== 'preview' ) { + $wgOut->addWikiMsg( 'usercssjsyoucanpreview' ); + } } else { $wgOut->addWikiMsg( 'userinvalidcssjstitle', $wgTitle->getSkinFromCssJsSubpage() ); } @@ -1645,9 +1647,8 @@ END $previewtext = wfMsg('userjspreview'); } $parserOptions->setTidy(true); - $parserOutput = $wgParser->parse( $previewtext , $this->mTitle, $parserOptions ); - //$wgOut->addHTML( $parserOutput->mText ); - $previewHTML = ''; + $parserOutput = $wgParser->parse( $previewtext, $this->mTitle, $parserOptions ); + $previewHTML = $parserOutput->mText; } elseif ( $rt = Title::newFromRedirect( $this->textbox1 ) ) { $previewHTML = $this->mArticle->viewRedirect( $rt, false ); } else { -- 2.20.1