From: Antoine Musso Date: Mon, 27 Jun 2005 00:06:30 +0000 (+0000) Subject: Fix #1242: category list missing on edit page X-Git-Tag: 1.5.0beta2~191 X-Git-Url: https://git.cyclocoop.org/%7B%7B%20url_for%28%27votes%27%2C%20votes=%27waiting%27%29%20%7D%7D?a=commitdiff_plain;h=a4c147a63ec1e2fd6f5e92020da08d310817ad25;p=lhc%2Fweb%2Fwiklou.git Fix #1242: category list missing on edit page --- diff --git a/includes/EditPage.php b/includes/EditPage.php index 4718f576c6..1291a4c59e 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -181,7 +181,8 @@ class EditPage { } 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 () ; @@ -584,6 +585,9 @@ class EditPage { $previewOutput = $this->getPreviewText( $isConflict, $isCssJsSubpage ); if ( $wgUser->getOption('previewontop' ) ) { $wgOut->addHTML( $previewOutput ); + if($this->mTitle->getNamespace() == NS_CATEGORY) { + $this->mArticle->closeShowCategory(); + } $wgOut->addHTML( "
\n" ); } } @@ -759,7 +763,7 @@ END $wgTitle, $parserOptions ); $previewHTML = $parserOutput->mText; - + $wgOut->addCategoryLinks($parserOutput->getCategoryLinks()); $wgOut->addLanguageLinks($parserOutput->getLanguageLinks()); return $previewhead . $previewHTML;