From 10aee3697a267abdbc16ead978b5aebf5115969c Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Sat, 15 Oct 2011 17:46:37 +0000 Subject: [PATCH] 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 --- includes/CategoryPage.php | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) 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(); } } -- 2.20.1