Follow up r36814. Make the deprecated function call the non-deprecated one instead...
authorPlatonides <platonides@users.mediawiki.org>
Sat, 4 Sep 2010 18:46:18 +0000 (18:46 +0000)
committerPlatonides <platonides@users.mediawiki.org>
Sat, 4 Sep 2010 18:46:18 +0000 (18:46 +0000)
includes/CategoryPage.php

index c6a7f14..020e835 100644 (file)
@@ -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