r25920 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r25919‎ | r25920 | r25921 >
Date:15:52, 18 September 2007
Author:brion
Status:old
Tags:
Comment:
* (bug 11383) Don't pull subcategories for non-category pages in category tree
Modified paths:
  • /trunk/extensions/CategoryTree/CategoryTreeFunctions.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CategoryTree/CategoryTreeFunctions.php
@@ -166,6 +166,11 @@
167167 function renderChildren( &$title, $mode = NULL, $depth=0 ) {
168168 global $wgCategoryTreeMaxChildren, $wgCategoryTreeDefaultMode;
169169
 170+ if( $title->getNamespace() != NS_CATEGORY ) {
 171+ // Non-categories can't have children. :)
 172+ return '';
 173+ }
 174+
170175 $dbr =& wfGetDB( DB_SLAVE );
171176
172177 #additional stuff to be used if "transaltion" by interwiki-links is desired

Status & tagging log