* Add hooks that run before the special page function call, after it, and before...
authorÆvar Arnfjörð Bjarmason <avar@users.mediawiki.org>
Sun, 11 Dec 2005 03:03:34 +0000 (03:03 +0000)
committerÆvar Arnfjörð Bjarmason <avar@users.mediawiki.org>
Sun, 11 Dec 2005 03:03:34 +0000 (03:03 +0000)
includes/SpecialPage.php

index d1eecec..622cf66 100644 (file)
@@ -412,8 +412,13 @@ class SpecialPage
                        if(!function_exists($func) and $this->mFile) {
                                require_once( $this->mFile );
                        }
-                       $this->outputHeader();
+                       if ( wfRunHooks( 'SpecialPageExecuteBeforeHeader', array( &$this, &$par, &$func ) ) )
+                               $this->outputHeader();
+                       if ( ! wfRunHooks( 'SpecialPageExecuteBeforePage', array( &$this, &$par, &$func ) ) )
+                               return;
                        $func( $par, $this );
+                       if ( ! wfRunHooks( 'SpecialPageExecuteAfterPage', array( &$this, &$par, &$func ) ) )
+                               return;
                } else {
                        $this->displayRestrictionError();
                }