MediaWiki REL1_33
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] );
63 }
64
72 public function isExpectedUnusedCategory() {
73 $pageId = $this->getTitle()->getArticleID();
74 $pageProps = PageProps::getInstance()->getProperties( $this->getTitle(), 'expectunusedcategory' );
75
76 return isset( $pageProps[$pageId] );
77 }
78}
and that you know you can do these things To protect your we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the or if you modify it For if you distribute copies of such a whether gratis or for a you must give the recipients all the rights that you have You must make sure that receive or can get the source code And you must show them these terms so they know their rights We protect your rights with two and(2) offer you this license which gives you legal permission to copy
static getInstance()
Definition PageProps.php:66
Special handling for category pages.
isHidden()
Checks if a category is hidden.
isExpectedUnusedCategory()
Checks if a category is expected to be an unused category.
hasViewableContent()
Don't return a 404 for categories in use.
Class representing a MediaWiki article and history.
Definition WikiPage.php:45
getTitle()
Get the title object of the article.
Definition WikiPage.php:294