From a4349f55ee0805753f4c333031395bdae0da13d0 Mon Sep 17 00:00:00 2001 From: Platonides Date: Sat, 4 Sep 2010 18:46:18 +0000 Subject: [PATCH] Follow up r36814. Make the deprecated function call the non-deprecated one instead of the other way around. --- includes/CategoryPage.php | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/includes/CategoryPage.php b/includes/CategoryPage.php index c6a7f146c1..020e8351c1 100644 --- a/includes/CategoryPage.php +++ b/includes/CategoryPage.php @@ -159,19 +159,10 @@ class CategoryViewer { /** * Add a subcategory to the internal lists, using a Category object */ - function addSubcategoryObject( $cat, $sortkey, $pageLength ) { - $title = $cat->getTitle(); - $this->addSubcategory( $title, $sortkey, $pageLength ); - } - - /** - * Add a subcategory to the internal lists, using a title object - * @deprecated kept for compatibility, please use addSubcategoryObject instead - */ - function addSubcategory( $title, $sortkey, $pageLength ) { + function addSubcategoryObject( Category $cat, $sortkey, $pageLength ) { // Subcategory; strip the 'Category' namespace from the link text. $this->children[] = $this->getSkin()->link( - $title, + $cat->getTitle(), null, array(), array(), @@ -181,6 +172,14 @@ class CategoryViewer { $this->children_start_char[] = $this->getSubcategorySortChar( $title, $sortkey ); } + /** + * Add a subcategory to the internal lists, using a title object + * @deprecated kept for compatibility, please use addSubcategoryObject instead + */ + function addSubcategory( Title $title, $sortkey, $pageLength ) { + $this->addSubcategoryObject( Category::newFromTitle( $title ), $sortkey, $pageLength ); + } + /** * Get the character to be used for sorting subcategories. * If there's a link from Category:A to Category:B, the sortkey of the resulting -- 2.20.1