X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fpage%2FWikiCategoryPage.php;h=2837573998610c608684a4e4473414e719be75f8;hb=4226fada45a83ad56e91ce7638d17d12fecec8ca;hp=d38200169b8b7301f4d51c5b33c52057ef6644cf;hpb=ca28853e225fb8c3a2715c6f5bcc558d9e482590;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/page/WikiCategoryPage.php b/includes/page/WikiCategoryPage.php index d38200169b..2837573998 100644 --- a/includes/page/WikiCategoryPage.php +++ b/includes/page/WikiCategoryPage.php @@ -47,4 +47,32 @@ class WikiCategoryPage extends WikiPage { } return false; } + + /** + * Checks if a category is hidden. + * + * @since 1.27 + * + * @return bool + */ + public function isHidden() { + $pageId = $this->getTitle()->getArticleID(); + $pageProps = PageProps::getInstance()->getProperties( $this->getTitle(), 'hiddencat' ); + + return isset( $pageProps[$pageId] ); + } + + /** + * Checks if a category is expected to be an unused category. + * + * @since 1.33 + * + * @return bool + */ + public function isExpectedUnusedCategory() { + $pageId = $this->getTitle()->getArticleID(); + $pageProps = PageProps::getInstance()->getProperties( $this->getTitle(), 'expectunusedcategory' ); + + return isset( $pageProps[$pageId] ); + } }