From cbd23d0d7ceceb074f8182cc06b89d9c394cc347 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Sun, 11 Dec 2005 03:03:34 +0000 Subject: [PATCH] * Add hooks that run before the special page function call, after it, and before that header thingy --- includes/SpecialPage.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/includes/SpecialPage.php b/includes/SpecialPage.php index d1eececad5..622cf66e60 100644 --- a/includes/SpecialPage.php +++ b/includes/SpecialPage.php @@ -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(); } -- 2.20.1