From dfae566d0b2f1cf0f2f3707d80f9c26c9851f720 Mon Sep 17 00:00:00 2001 From: Victor Vasiliev Date: Thu, 20 Mar 2008 16:39:02 +0000 Subject: [PATCH] Use Title::makeTitleSafe --- includes/Category.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/Category.php b/includes/Category.php index b22f094232..37127d5484 100644 --- a/includes/Category.php +++ b/includes/Category.php @@ -206,6 +206,7 @@ class Category extends CategoryListBase { public function getSubcatCount() { return $this->getX( 'mSubcats' ); } /** @return mixed Number of member files, or false on failure */ public function getFileCount() { return $this->getX( 'mFiles' ); } + /** * This is not implemented in the base class, because arrays of Titles are * evil. @@ -216,8 +217,7 @@ class Category extends CategoryListBase { if( !$this->initialize() ) { return false; } - # FIXME is there a better way to do this? - return Title::newFromText( "Category:{$this->mNames[0]}" ); + return Title::makeTitleSafe( NS_CATEGORY, $this->mNames[0] ); } /** Generic accessor */ -- 2.20.1