From: Sam Reed Date: Sat, 15 Oct 2011 17:46:37 +0000 (+0000) Subject: Seems some base class refactoring has move mTitle X-Git-Tag: 1.31.0-rc.0~27100 X-Git-Url: http://git.cyclocoop.org/data/Fool?a=commitdiff_plain;h=10aee3697a267abdbc16ead978b5aebf5115969c;p=lhc%2Fweb%2Fwiklou.git 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 --- diff --git a/includes/CategoryPage.php b/includes/CategoryPage.php index 92646af027..8734b4c56c 100644 --- a/includes/CategoryPage.php +++ b/includes/CategoryPage.php @@ -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(); } }