r93105 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r93104‎ | r93105 | r93106 >
Date:20:11, 25 July 2011
Author:aaron
Status:resolved (Comments)
Tags:
Comment:
Make Chad happy ;)
Modified paths:
  • /trunk/phase3/maintenance/Maintenance.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/Maintenance.php
@@ -139,14 +139,15 @@
140140 */
141141 public static function shouldExecute() {
142142 $bt = debug_backtrace();
143 - if ( count( $bt ) < 2 ) {
 143+ $count = count( $bt );
 144+ if ( $count < 2 ) {
144145 return false; // sanity
145146 }
146147 if ( $bt[0]['class'] !== 'Maintenance' || $bt[0]['function'] !== 'shouldExecute' ) {
147148 return false; // last call should be to this function
148149 }
149 - $includeFuncs = array( 'require_once', 'require', 'include', 'include_once' );
150 - for( $i=1; $i < count( $bt ); $i++ ) {
 150+ $includeFuncs = array( 'require_once', 'require', 'include' );
 151+ for( $i=1; $i < $count; $i++ ) {
151152 if ( !in_array( $bt[$i]['function'], $includeFuncs ) ) {
152153 return false; // previous calls should all be "requires"
153154 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r93107Removed code lost in r93105, wtf.aaron20:20, 25 July 2011

Comments

#Comment by 😂 (talk | contribs)   20:18, 25 July 2011

You removed include_once.

Status & tagging log