* (bug 11383) Don't pull subcategories for non-category pages in category tree

This commit is contained in:
Brion Vibber 2007-09-18 15:52:30 +00:00
parent f081ed2177
commit 6d8cbbd891

View file

@ -166,6 +166,11 @@ class CategoryTree {
function renderChildren( &$title, $mode = NULL, $depth=0 ) { function renderChildren( &$title, $mode = NULL, $depth=0 ) {
global $wgCategoryTreeMaxChildren, $wgCategoryTreeDefaultMode; global $wgCategoryTreeMaxChildren, $wgCategoryTreeDefaultMode;
if( $title->getNamespace() != NS_CATEGORY ) {
// Non-categories can't have children. :)
return '';
}
$dbr =& wfGetDB( DB_SLAVE ); $dbr =& wfGetDB( DB_SLAVE );
#additional stuff to be used if "transaltion" by interwiki-links is desired #additional stuff to be used if "transaltion" by interwiki-links is desired