Seems some base class refactoring has move mTitle
authorSam Reed <reedy@users.mediawiki.org>
Sat, 15 Oct 2011 17:46:37 +0000 (17:46 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Sat, 15 Oct 2011 17:46:37 +0000 (17:46 +0000)
/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

index 92646af..8734b4c 100644 (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();
                }
        }