X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Fpage%2FWikiCategoryPage.php;h=6c932029ae2c4dece24d4c66c383cbe8d58c2c4e;hb=4d9dbc7d8d4a6a739d48a3ee4888f7ef3f85763c;hp=d38200169b8b7301f4d51c5b33c52057ef6644cf;hpb=1b8657de2ad6c533505f002dba2df8dbe7344bba;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/page/WikiCategoryPage.php b/includes/page/WikiCategoryPage.php index d38200169b..6c932029ae 100644 --- a/includes/page/WikiCategoryPage.php +++ b/includes/page/WikiCategoryPage.php @@ -47,4 +47,18 @@ 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] ) ? true : false; + } }