# Subclasses can change this to override the viewer class.
protected $mCategoryViewerClass = 'CategoryViewer';
- /**
- * @var Title
- */
- protected $mTitle;
-
/**
* @param $title Title
* @return WikiCategoryPage
$this->getContext()->getUser()->getOption( 'diffonly' ) );
if ( isset( $diff ) && $diffOnly ) {
- return parent::view();
+ parent::view();
+ return;
}
if ( !wfRunHooks( 'CategoryPageView', array( &$this ) ) ) {
return;
}
- if ( NS_CATEGORY == $this->mTitle->getNamespace() ) {
+ $title = $this->getTitle();
+ if ( NS_CATEGORY == $title->getNamespace() ) {
$this->openShowCategory();
}
parent::view();
- if ( NS_CATEGORY == $this->mTitle->getNamespace() ) {
+ if ( NS_CATEGORY == $title->getNamespace() ) {
$this->closeShowCategory();
}
}
unset( $reqArray["from"] );
unset( $reqArray["to"] );
- $viewer = new $this->mCategoryViewerClass( $this->mTitle, $this->getContext(), $from, $until, $reqArray );
+ $viewer = new $this->mCategoryViewerClass( $this->getContext()->getTitle(), $this->getContext(), $from, $until, $reqArray );
$this->getContext()->getOutput()->addHTML( $viewer->getHTML() );
}
}