From: Brion Vibber Date: Fri, 3 Oct 2008 00:38:33 +0000 (+0000) Subject: Back out r41548 "Classes derived from SpecialPage can now specify a run() method... X-Git-Tag: 1.31.0-rc.0~44949 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=85d139fc8a568b9d2eefe12265667192f5608d53;p=lhc%2Fweb%2Fwiklou.git Back out r41548 "Classes derived from SpecialPage can now specify a run() method, which will be executed after all magic performed by SpecialPage::execute()" It's unclear what benefit this brings, and the magic calling is scary and icky. --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 59d6345c00..d78a19299b 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -145,8 +145,6 @@ The following extensions are migrated into MediaWiki 1.14: $wgExternalLinkTarget * api.php now sends "Retry-After" and "X-Database-Lag" HTTP headers if the maxlag check fails, just like index.php does -* Classes derived from SpecialPage can now specify a run() method, which will - be executed after all magic performed by SpecialPage::execute() === Bug fixes in 1.14 === diff --git a/includes/SpecialPage.php b/includes/SpecialPage.php index b96ab67402..fec6c0a88a 100644 --- a/includes/SpecialPage.php +++ b/includes/SpecialPage.php @@ -740,13 +740,8 @@ class SpecialPage if ( $this->userCanExecute( $wgUser ) ) { $func = $this->mFunction; // only load file if the function does not exist - if ( !is_callable( $func ) ) { - // Check whether a run method has been defined - if ( is_callable( array( $this, 'run' ) ) ) - $func = array( $this, 'run' ); - // Else load from file if it has been specified - elseif ( $this->mFile ) - require_once( $this->mFile ); + 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 ) ) ) @@ -761,7 +756,6 @@ class SpecialPage } } - function outputHeader() { global $wgOut, $wgContLang;