r12052 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r12051‎ | r12052 | r12053 >
Date:03:03, 11 December 2005
Author:avar
Status:old
Tags:
Comment:
* Add hooks that run before the special page function call, after it, and before that header thingy
Modified paths:
  • /trunk/phase3/includes/SpecialPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialPage.php
@@ -412,8 +412,13 @@
413413 if(!function_exists($func) and $this->mFile) {
414414 require_once( $this->mFile );
415415 }
416 - $this->outputHeader();
 416+ if ( wfRunHooks( 'SpecialPageExecuteBeforeHeader', array( &$this, &$par, &$func ) ) )
 417+ $this->outputHeader();
 418+ if ( ! wfRunHooks( 'SpecialPageExecuteBeforePage', array( &$this, &$par, &$func ) ) )
 419+ return;
417420 $func( $par, $this );
 421+ if ( ! wfRunHooks( 'SpecialPageExecuteAfterPage', array( &$this, &$par, &$func ) ) )
 422+ return;
418423 } else {
419424 $this->displayRestrictionError();
420425 }

Status & tagging log