Change-Id: I0ee3672a3d698eda25191bccbbc10c9e2f9f7546
*/
protected function showPreview( $text ) {
global $wgOut;
*/
protected function showPreview( $text ) {
global $wgOut;
- if ( $this->mTitle->getNamespace() == NS_CATEGORY ) {
+ if ( $this->mArticle instanceof CategoryPage ) {
$this->mArticle->openShowCategory();
}
# This hook seems slightly odd here, but makes things more
# consistent for extensions.
Hooks::run( 'OutputPageBeforeHTML', [ &$wgOut, &$text ] );
$wgOut->addHTML( $text );
$this->mArticle->openShowCategory();
}
# This hook seems slightly odd here, but makes things more
# consistent for extensions.
Hooks::run( 'OutputPageBeforeHTML', [ &$wgOut, &$text ] );
$wgOut->addHTML( $text );
- if ( $this->mTitle->getNamespace() == NS_CATEGORY ) {
+ if ( $this->mArticle instanceof CategoryPage ) {
$this->mArticle->closeShowCategory();
}
}
$this->mArticle->closeShowCategory();
}
}