MediaWiki REL1_32
WikiCategoryPage.php
Go to the documentation of this file.
1<?php
27
35 public function hasViewableContent() {
36 if ( parent::hasViewableContent() ) {
37 return true;
38 } else {
39 $cat = Category::newFromTitle( $this->mTitle );
40 // If any of these are not 0, then has members
41 if ( $cat->getPageCount()
42 || $cat->getSubcatCount()
43 || $cat->getFileCount()
44 ) {
45 return true;
46 }
47 }
48 return false;
49 }
50
58 public function isHidden() {
59 $pageId = $this->getTitle()->getArticleID();
60 $pageProps = PageProps::getInstance()->getProperties( $this->getTitle(), 'hiddencat' );
61
62 return isset( $pageProps[$pageId] ) ? true : false;
63 }
64}
static getInstance()
Definition PageProps.php:66
Special handling for category pages.
isHidden()
Checks if a category is hidden.
hasViewableContent()
Don't return a 404 for categories in use.
Class representing a MediaWiki article and history.
Definition WikiPage.php:44
getTitle()
Get the title object of the article.
Definition WikiPage.php:276
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return true
Definition hooks.txt:2055