3
class CategoryTreeCategoryPage extends CategoryPage {
4
function closeShowCategory() {
5
global $wgOut, $wgRequest;
6
$from = $wgRequest->getVal( 'from' );
7
$until = $wgRequest->getVal( 'until' );
9
$viewer = new CategoryTreeCategoryViewer( $this->mTitle, $from, $until );
10
$wgOut->addHTML( $viewer->getHTML() );
14
class CategoryTreeCategoryViewer extends CategoryViewer {
17
function getCategoryTree() {
18
global $wgOut, $wgCategoryTreeCategoryPageOptions, $wgCategoryTreeForceHeaders;
20
if ( ! isset($this->categorytree) ) {
21
if ( !$wgCategoryTreeForceHeaders ) CategoryTree::setHeaders( $wgOut );
23
$this->categorytree = new CategoryTree( $wgCategoryTreeCategoryPageOptions );
26
return $this->categorytree;
30
* Add a subcategory to the internal lists
32
function addSubcategoryObject( $cat, $sortkey, $pageLength ) {
33
global $wgContLang, $wgOut, $wgRequest;
35
$title = $cat->getTitle();
37
if ( $wgRequest->getCheck( 'notree' ) ) {
38
return parent::addSubcategoryObject( $cat, $sortkey, $pageLength );
41
/*if ( ! $GLOBALS['wgCategoryTreeUnifiedView'] ) {
42
$this->child_cats[] = $cat;
43
return parent::addSubcategory( $cat, $sortkey, $pageLength );
46
$tree = $this->getCategoryTree();
48
$this->children[] = $tree->renderNodeInfo( $title, $cat );
50
$this->children_start_char[] = $this->getSubcategorySortChar( $title, $sortkey );
53
function clearCategoryState() {
54
$this->child_cats = array();
55
parent::clearCategoryState();
58
function finaliseCategoryState() {
60
$this->child_cats = array_reverse( $this->child_cats );
62
parent::finaliseCategoryState();