Index: trunk/phase3/includes/CategoryPage.php |
— | — | @@ -159,19 +159,10 @@ |
160 | 160 | /** |
161 | 161 | * Add a subcategory to the internal lists, using a Category object |
162 | 162 | */ |
163 | | - function addSubcategoryObject( $cat, $sortkey, $pageLength ) { |
164 | | - $title = $cat->getTitle(); |
165 | | - $this->addSubcategory( $title, $sortkey, $pageLength ); |
166 | | - } |
167 | | - |
168 | | - /** |
169 | | - * Add a subcategory to the internal lists, using a title object |
170 | | - * @deprecated kept for compatibility, please use addSubcategoryObject instead |
171 | | - */ |
172 | | - function addSubcategory( $title, $sortkey, $pageLength ) { |
| 163 | + function addSubcategoryObject( Category $cat, $sortkey, $pageLength ) { |
173 | 164 | // Subcategory; strip the 'Category' namespace from the link text. |
174 | 165 | $this->children[] = $this->getSkin()->link( |
175 | | - $title, |
| 166 | + $cat->getTitle(), |
176 | 167 | null, |
177 | 168 | array(), |
178 | 169 | array(), |
— | — | @@ -182,6 +173,14 @@ |
183 | 174 | } |
184 | 175 | |
185 | 176 | /** |
| 177 | + * Add a subcategory to the internal lists, using a title object |
| 178 | + * @deprecated kept for compatibility, please use addSubcategoryObject instead |
| 179 | + */ |
| 180 | + function addSubcategory( Title $title, $sortkey, $pageLength ) { |
| 181 | + $this->addSubcategoryObject( Category::newFromTitle( $title ), $sortkey, $pageLength ); |
| 182 | + } |
| 183 | + |
| 184 | + /** |
186 | 185 | * Get the character to be used for sorting subcategories. |
187 | 186 | * If there's a link from Category:A to Category:B, the sortkey of the resulting |
188 | 187 | * entry in the categorylinks table is Category:A, not A, which it SHOULD be. |