r25130 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r25129‎ | r25130 | r25131 >
Date:12:40, 25 August 2007
Author:brion
Status:old (Comments)
Tags:
Comment:
Fix for bug 10883: correctly handle categories that look like interwikis if you ignore the namespace part
Modified paths:
  • /trunk/extensions/CategoryTree/CategoryTreeFunctions.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CategoryTree/CategoryTreeFunctions.php
@@ -379,7 +379,7 @@
380380 # The title must be in the category namespace
381381 # Ignore a leading Category: if there is one
382382 $t = Title::newFromText( $title, NS_CATEGORY );
383 - if ( $t && $t->getNamespace() != NS_CATEGORY ) {
 383+ if ( $t && ( $t->getNamespace() != NS_CATEGORY || $t->getInterWiki() != '' ) ) {
384384 $title = "Category:$title";
385385 $t = Title::newFromText( $title );
386386 }

Comments

#Comment by Mormegil (talk | contribs)   13:48, 11 July 2012

This does not work for category titles beginning with $wgLocalInterwiki, see bugzilla:10883#c2.

Status & tagging log