From: Niklas Laxström Date: Sun, 28 Sep 2008 14:56:07 +0000 (+0000) Subject: * user{css,js}preview was not shown since r40066 X-Git-Tag: 1.31.0-rc.0~45047 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/password.php?a=commitdiff_plain;h=4a2641f4e5510c3798a589b91e7529d81b065283;p=lhc%2Fweb%2Fwiklou.git * user{css,js}preview was not shown since r40066 * readd !preview condition to usercssjsyoucanpreview --- 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 {