r88486 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r88485‎ | r88486 | r88487 >
Date:21:13, 20 May 2011
Author:platonides
Status:deferred
Tags:
Comment:
This code for supporting MWInit was lying in my Working Copy
Modified paths:
  • /trunk/tools/code-utils/check-vars.php (modified) (history)

Diff [purge]

Index: trunk/tools/code-utils/check-vars.php
@@ -16,6 +16,7 @@
1717 require_once( "$IP/includes/AutoLoader.php" );
1818 $wgAutoloadClasses = &$wgAutoloadLocalClasses;
1919 include_once( "$IP/tests/TestsAutoLoader.php" );
 20+$wgAutoloadClasses['MWInit'] = "$IP/includes/Init.php";
2021
2122 $mwDeprecatedFunctions = false;
2223 @include( dirname( __FILE__ ) . "/deprecated.functions" );
@@ -684,7 +685,9 @@
685686 } else if ( $token[0] == T_CURLY_OPEN || $token == '}' ) {
686687 continue;
687688 } else if ( !is_array( $token ) ) {
688 - if ( ( $token != '(' ) || $requirePath != '' ) {
 689+ if ( $token == '(' && ( $requirePath == 'MWInit::compiledPath' || $requirePath == 'MWInit::interpretedPath' ) ) {
 690+ $requirePath = "$IP/";
 691+ } elseif ( ( $token != '(' ) || $requirePath != '' ) {
689692 $requirePath .= $token[0];
690693 }
691694 } else if ( in_array( $token[0], array( T_CONSTANT_ENCAPSED_STRING, T_ENCAPSED_AND_WHITESPACE ) ) ) {
@@ -895,7 +898,7 @@
896899 if ( $globalData[1] <= $this->mBraces )
897900 continue; # In scope
898901
899 - # global $x still affects the variable after the endo of the
 902+ # global $x still affects the variable after the end of the
900903 # conditional, but only if the condition was true.
901904 # We keep in the safe side and only consider it defined inside
902905 # the if block (see r69883).

Status & tagging log