CategoryPageView hook as in 1.4
authorGabriel Wicke <gwicke@users.mediawiki.org>
Mon, 25 Apr 2005 11:09:21 +0000 (11:09 +0000)
committerGabriel Wicke <gwicke@users.mediawiki.org>
Mon, 25 Apr 2005 11:09:21 +0000 (11:09 +0000)
docs/hooks.txt
includes/CategoryPage.php

index 78b66ba..c64425b 100644 (file)
@@ -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
+
index 2922b71..b90cb33 100644 (file)
@@ -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();
                }