r41584 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r41583‎ | r41584 | r41585 >
Date:00:38, 3 October 2008
Author:brion
Status:old
Tags:
Comment:
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.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/SpecialPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialPage.php
@@ -740,13 +740,8 @@
741741 if ( $this->userCanExecute( $wgUser ) ) {
742742 $func = $this->mFunction;
743743 // only load file if the function does not exist
744 - if ( !is_callable( $func ) ) {
745 - // Check whether a run method has been defined
746 - if ( is_callable( array( $this, 'run' ) ) )
747 - $func = array( $this, 'run' );
748 - // Else load from file if it has been specified
749 - elseif ( $this->mFile )
750 - require_once( $this->mFile );
 744+ if(!is_callable($func) and $this->mFile) {
 745+ require_once( $this->mFile );
751746 }
752747 # FIXME: these hooks are broken for extensions and anything else that subclasses SpecialPage.
753748 if ( wfRunHooks( 'SpecialPageExecuteBeforeHeader', array( &$this, &$par, &$func ) ) )
@@ -761,7 +756,6 @@
762757 }
763758 }
764759
765 -
766760 function outputHeader() {
767761 global $wgOut, $wgContLang;
768762
Index: trunk/phase3/RELEASE-NOTES
@@ -145,8 +145,6 @@
146146 $wgExternalLinkTarget
147147 * api.php now sends "Retry-After" and "X-Database-Lag" HTTP headers if the maxlag
148148 check fails, just like index.php does
149 -* Classes derived from SpecialPage can now specify a run() method, which will
150 - be executed after all magic performed by SpecialPage::execute()
151149
152150
153151 === Bug fixes in 1.14 ===

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r41548Classes derived from SpecialPage can now specify a run() method, which will b...btongminh17:30, 2 October 2008

Status & tagging log