Last modified: 2010-05-15 15:37:29 UTC
TOP ------------------------------------------------------------------------------- $wgOut->addHTML( '<div id="wikiPreview">' ); if ( 'preview' == $formtype) { $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" ); } } $wgOut->addHTML( '</div>' ); ------------------------------------------------------------------------------- BOTTOM ------------------------------------------------------------------------------- if ( $formtype == 'preview' && !$wgUser->getOption( 'previewontop' ) ) { $wgOut->addHTML( '<div id="wikiPreview">' . $previewOutput . '</div>' ); } ------------------------------------------------------------------------------- I.e. this is missing: if($this->mTitle->getNamespace() == NS_CATEGORY) { $this->mArticle->closeShowCategory(); } Also, if it's at the bottom. "<div id="wikiPreview"></div>" is still output at the top, resulting in two divs with the same id. (I don't know if this causes a problem for scripting or not but it's still unnecessary.) (I also noticed openShowCategory() not called - although it is currently blank, if anything was added to it then the preview would be different to the action view.)
Fixed in HEAD for 1.6.