Index: trunk/extensions/CategoryTree/CategoryTreeFunctions.php |
— | — | @@ -430,7 +430,7 @@ |
431 | 431 | $options = array( 'ORDER BY' => 'cl_type, cl_sortkey', 'LIMIT' => $wgCategoryTreeMaxChildren ); |
432 | 432 | |
433 | 433 | if ( $inverse ) { |
434 | | - $joins['categorylinks'] = array( 'RIGHT JOIN', 'cl_to = page_title AND page_namespace = ' . NS_CATEGORY ); |
| 434 | + $joins['categorylinks'] = array( 'RIGHT JOIN', array( 'cl_to = page_title', 'page_namespace' => NS_CATEGORY ) ); |
435 | 435 | $where['cl_from'] = $title->getArticleId(); |
436 | 436 | } else { |
437 | 437 | $joins['categorylinks'] = array( 'JOIN', 'cl_from = page_id' ); |
— | — | @@ -456,7 +456,7 @@ |
457 | 457 | if ( $doCount ) { |
458 | 458 | $tables = array_merge( $tables, array( 'category' ) ); |
459 | 459 | $fields = array_merge( $fields, array( 'cat_id', 'cat_title', 'cat_subcats', 'cat_pages', 'cat_files' ) ); |
460 | | - $joins['category'] = array( 'LEFT JOIN', 'cat_title = page_title AND page_namespace = ' . NS_CATEGORY ); |
| 460 | + $joins['category'] = array( 'LEFT JOIN', array( 'cat_title = page_title', 'page_namespace' => NS_CATEGORY ) ); |
461 | 461 | } |
462 | 462 | |
463 | 463 | $res = $dbr->select( $tables, $fields, $where, __METHOD__, $options, $joins ); |