No need to get a DB object since we don't use it there
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Thu, 19 Feb 2009 11:20:29 +0000 (11:20 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Thu, 19 Feb 2009 11:20:29 +0000 (11:20 +0000)
includes/Title.php

index cad93f9..37cd0b9 100644 (file)
@@ -1613,7 +1613,6 @@ class Title {
                        return $this->mHasSubpages;
                }
 
-               $db = wfGetDB( DB_SLAVE );
                $subpages = $this->getSubpages( 1 );
                if( $subpages instanceof TitleArray )
                        return $this->mHasSubpages = (bool)$subpages->count();
@@ -1626,7 +1625,7 @@ class Title {
         * @return mixed TitleArray, or empty array if this page's namespace
         *  doesn't allow subpages
         */
-       public function getSubpages($limit = -1) {
+       public function getSubpages( $limit = -1 ) {
                if( !MWNamespace::hasSubpages( $this->getNamespace() ) )
                        return array();