From: Aaron Schulz Date: Mon, 13 Oct 2008 04:38:54 +0000 (+0000) Subject: *Remove useless garbage hooks. This kind of stuff shouldn't be in the core. X-Git-Tag: 1.31.0-rc.0~44769 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=1ac101223cf84070721f2bd5fb19f461a1407662;p=lhc%2Fweb%2Fwiklou.git *Remove useless garbage hooks. This kind of stuff shouldn't be in the core. --- 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(); }