From: Gabriel Wicke Date: Mon, 25 Apr 2005 11:09:21 +0000 (+0000) Subject: CategoryPageView hook as in 1.4 X-Git-Tag: 1.5.0alpha1~139 X-Git-Url: https://git.cyclocoop.org//%22%7B%7Blocalurle:Project:Pol%C3%ADtica_de_imagens%7D%7D/%22?a=commitdiff_plain;h=f3810a3c70c7cbe38ce1558c84b533f0083c9634;p=lhc%2Fweb%2Fwiklou.git CategoryPageView hook as in 1.4 --- diff --git a/docs/hooks.txt b/docs/hooks.txt index 78b66ba31d..c64425b378 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -336,3 +336,6 @@ $article: article object to be watched $user: user that watched $article: article object watched +'CategoryPageView': before viewing a categorypage in CategoryPage::view +$catpage: CategoryPage instance + diff --git a/includes/CategoryPage.php b/includes/CategoryPage.php index 2922b7159a..b90cb3361e 100644 --- a/includes/CategoryPage.php +++ b/includes/CategoryPage.php @@ -19,6 +19,8 @@ if( $wgCategoryMagicGallery ) class CategoryPage extends Article { function view() { + if(!wfRunHooks('CategoryPageView', array(&$this))) return; + if ( NS_CATEGORY == $this->mTitle->getNamespace() ) { $this->openShowCategory(); }