} else if ( $this->diff ) {
$this->editForm( 'diff' );
} else { # First time through
- if( $wgUser->getOption('previewonfirst') ) {
+ if( $wgUser->getOption('previewonfirst')
+ or $this->mTitle->getNamespace() == NS_CATEGORY ) {
$this->editForm( 'preview', true );
} else {
$this->extractMetaDataFromArticle () ;
$previewOutput = $this->getPreviewText( $isConflict, $isCssJsSubpage );
if ( $wgUser->getOption('previewontop' ) ) {
$wgOut->addHTML( $previewOutput );
+ if($this->mTitle->getNamespace() == NS_CATEGORY) {
+ $this->mArticle->closeShowCategory();
+ }
$wgOut->addHTML( "<br style=\"clear:both;\" />\n" );
}
}
$wgTitle, $parserOptions );
$previewHTML = $parserOutput->mText;
-
+
$wgOut->addCategoryLinks($parserOutput->getCategoryLinks());
$wgOut->addLanguageLinks($parserOutput->getLanguageLinks());
return $previewhead . $previewHTML;