From 1ac101223cf84070721f2bd5fb19f461a1407662 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Mon, 13 Oct 2008 04:38:54 +0000 Subject: [PATCH] *Remove useless garbage hooks. This kind of stuff shouldn't be in the core. --- docs/hooks.txt | 18 ------------------ includes/SpecialPage.php | 8 +------- 2 files changed, 1 insertion(+), 25 deletions(-) diff --git a/docs/hooks.txt b/docs/hooks.txt index 9a0ad256cd..ee468c23c2 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -1219,24 +1219,6 @@ $movePage: MovePageForm object $oldTitle: old title (object) $newTitle: new title (object) -'SpecialPageExecuteAfterPage': called after executing a special page -Warning: Not all the special pages call this hook -$specialPage: SpecialPage object -$par: paramter passed to the special page (string) -$funct: function called to execute the special page - -'SpecialPageExecuteBeforeHeader': called before setting the header text of the special page -Warning: Not all the special pages call this hook -$specialPage: SpecialPage object -$par: paramter passed to the special page (string) -$funct: function called to execute the special page - -'SpecialPageExecuteBeforePage': called after setting the special page header text but before the main execution -Warning: Not all the special pages call this hook -$specialPage: SpecialPage object -$par: paramter passed to the special page (string) -$funct: function called to execute the special page - 'SpecialPage_initList': called when setting up SpecialPage::$mList, use this hook to remove a core special page $list: list (array) of core special pages diff --git a/includes/SpecialPage.php b/includes/SpecialPage.php index cf16546570..f807d19069 100644 --- a/includes/SpecialPage.php +++ b/includes/SpecialPage.php @@ -744,14 +744,8 @@ class SpecialPage if(!is_callable($func) and $this->mFile) { require_once( $this->mFile ); } - # FIXME: these hooks are broken for extensions and anything else that subclasses SpecialPage. - if ( wfRunHooks( 'SpecialPageExecuteBeforeHeader', array( &$this, &$par, &$func ) ) ) - $this->outputHeader(); - if ( ! wfRunHooks( 'SpecialPageExecuteBeforePage', array( &$this, &$par, &$func ) ) ) - return; + $this->outputHeader(); call_user_func( $func, $par, $this ); - if ( ! wfRunHooks( 'SpecialPageExecuteAfterPage', array( &$this, &$par, &$func ) ) ) - return; } else { $this->displayRestrictionError(); } -- 2.20.1