r99896 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r99895‎ | r99896 | r99897 >
Date:17:46, 15 October 2011
Author:reedy
Status:ok
Tags:
Comment:
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
Modified paths:
  • /trunk/phase3/includes/CategoryPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/CategoryPage.php
@@ -18,11 +18,6 @@
1919 protected $mCategoryViewerClass = 'CategoryViewer';
2020
2121 /**
22 - * @var Title
23 - */
24 - protected $mTitle;
25 -
26 - /**
2722 * @param $title Title
2823 * @return WikiCategoryPage
2924 */
@@ -49,20 +44,22 @@
5045 $this->getContext()->getUser()->getOption( 'diffonly' ) );
5146
5247 if ( isset( $diff ) && $diffOnly ) {
53 - return parent::view();
 48+ parent::view();
 49+ return;
5450 }
5551
5652 if ( !wfRunHooks( 'CategoryPageView', array( &$this ) ) ) {
5753 return;
5854 }
5955
60 - if ( NS_CATEGORY == $this->mTitle->getNamespace() ) {
 56+ $title = $this->getTitle();
 57+ if ( NS_CATEGORY == $title->getNamespace() ) {
6158 $this->openShowCategory();
6259 }
6360
6461 parent::view();
6562
66 - if ( NS_CATEGORY == $this->mTitle->getNamespace() ) {
 63+ if ( NS_CATEGORY == $title->getNamespace() ) {
6764 $this->closeShowCategory();
6865 }
6966 }

Status & tagging log