r42015 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r42014‎ | r42015 | r42016 >
Date:04:38, 13 October 2008
Author:aaron
Status:old
Tags:
Comment:
*Remove useless garbage hooks. This kind of stuff shouldn't be in the core.
Modified paths:
  • /trunk/phase3/docs/hooks.txt (modified) (history)
  • /trunk/phase3/includes/SpecialPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/docs/hooks.txt
@@ -1219,24 +1219,6 @@
12201220 $oldTitle: old title (object)
12211221 $newTitle: new title (object)
12221222
1223 -'SpecialPageExecuteAfterPage': called after executing a special page
1224 -Warning: Not all the special pages call this hook
1225 -$specialPage: SpecialPage object
1226 -$par: paramter passed to the special page (string)
1227 -$funct: function called to execute the special page
1228 -
1229 -'SpecialPageExecuteBeforeHeader': called before setting the header text of the special page
1230 -Warning: Not all the special pages call this hook
1231 -$specialPage: SpecialPage object
1232 -$par: paramter passed to the special page (string)
1233 -$funct: function called to execute the special page
1234 -
1235 -'SpecialPageExecuteBeforePage': called after setting the special page header text but before the main execution
1236 -Warning: Not all the special pages call this hook
1237 -$specialPage: SpecialPage object
1238 -$par: paramter passed to the special page (string)
1239 -$funct: function called to execute the special page
1240 -
12411223 'SpecialPage_initList': called when setting up SpecialPage::$mList, use this hook to remove a core special page
12421224 $list: list (array) of core special pages
12431225
Index: trunk/phase3/includes/SpecialPage.php
@@ -744,14 +744,8 @@
745745 if(!is_callable($func) and $this->mFile) {
746746 require_once( $this->mFile );
747747 }
748 - # FIXME: these hooks are broken for extensions and anything else that subclasses SpecialPage.
749 - if ( wfRunHooks( 'SpecialPageExecuteBeforeHeader', array( &$this, &$par, &$func ) ) )
750 - $this->outputHeader();
751 - if ( ! wfRunHooks( 'SpecialPageExecuteBeforePage', array( &$this, &$par, &$func ) ) )
752 - return;
 748+ $this->outputHeader();
753749 call_user_func( $func, $par, $this );
754 - if ( ! wfRunHooks( 'SpecialPageExecuteAfterPage', array( &$this, &$par, &$func ) ) )
755 - return;
756750 } else {
757751 $this->displayRestrictionError();
758752 }

Status & tagging log