http://www.mediawiki.org/wiki/Special:Code/MediaWiki/72388
Revision: 72388
Author: platonides
Date: 2010-09-04 18:46:18 +0000 (Sat, 04 Sep 2010)
Log Message:
-----------
Follow up r36814. Make the deprecated function call the non-deprecated one
instead of the other way around.
Modified Paths:
--------------
trunk/phase3/includes/CategoryPage.php
Modified: trunk/phase3/includes/CategoryPage.php
===================================================================
--- trunk/phase3/includes/CategoryPage.php 2010-09-04 18:31:37 UTC (rev
72387)
+++ trunk/phase3/includes/CategoryPage.php 2010-09-04 18:46:18 UTC (rev
72388)
@@ -159,19 +159,10 @@
/**
* 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(),
@@ -182,6 +173,14 @@
}
/**
+ * 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
* entry in the categorylinks table is Category:A, not A, which it
SHOULD be.
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs