Seems some base class refactoring has move mTitle

/www/w/includes/CategoryPage.php on line 59
-rakkaus/#mediawiki-i18n- [15-Oct-2011 17:23:57] PHP Fatal error:  Call to a member function getNamespace() on a non-object in /www/w/includes/CategoryPage.php on line 59

Also changed return, as parent::view() doesn't return anything
This commit is contained in:
Sam Reed 2011-10-15 17:46:37 +00:00
parent 445a8a008c
commit 10aee3697a

View file

@ -17,11 +17,6 @@ class CategoryPage extends Article {
# Subclasses can change this to override the viewer class.
protected $mCategoryViewerClass = 'CategoryViewer';
/**
* @var Title
*/
protected $mTitle;
/**
* @param $title Title
* @return WikiCategoryPage
@ -49,20 +44,22 @@ class CategoryPage extends Article {
$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();
}
}