Index: trunk/phase3/includes/Category.php |
— | — | @@ -206,6 +206,7 @@ |
207 | 207 | public function getSubcatCount() { return $this->getX( 'mSubcats' ); } |
208 | 208 | /** @return mixed Number of member files, or false on failure */ |
209 | 209 | public function getFileCount() { return $this->getX( 'mFiles' ); } |
| 210 | + |
210 | 211 | /** |
211 | 212 | * This is not implemented in the base class, because arrays of Titles are |
212 | 213 | * evil. |
— | — | @@ -216,8 +217,7 @@ |
217 | 218 | if( !$this->initialize() ) { |
218 | 219 | return false; |
219 | 220 | } |
220 | | - # FIXME is there a better way to do this? |
221 | | - return Title::newFromText( "Category:{$this->mNames[0]}" ); |
| 221 | + return Title::makeTitleSafe( NS_CATEGORY, $this->mNames[0] ); |
222 | 222 | } |
223 | 223 | |
224 | 224 | /** Generic accessor */ |