*Remove useless garbage hooks. This kind of stuff shouldn't be in the core.
authorAaron Schulz <aaron@users.mediawiki.org>
Mon, 13 Oct 2008 04:38:54 +0000 (04:38 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Mon, 13 Oct 2008 04:38:54 +0000 (04:38 +0000)
docs/hooks.txt
includes/SpecialPage.php

index 9a0ad25..ee468c2 100644 (file)
@@ -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
 
index cf16546..f807d19 100644 (file)
@@ -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();
                }