Index: trunk/tools/code-utils/check-vars.php |
— | — | @@ -7,8 +7,8 @@ |
8 | 8 | * find phase3/ \( -name \*.php -or -name \*.inc \) -not \( -name importUseModWiki.php -o -name diffLanguage.php \) -exec php tools/code-utils/check-vars.php \{\} + |
9 | 9 | */ |
10 | 10 | |
11 | | -require_once( dirname( dirname( dirname( __FILE__ ) ) ) . "/phase3/includes/Defines.php" ); # Faster than parsing |
12 | | -require_once( dirname( dirname( dirname( __FILE__ ) ) ) . "/phase3/includes/AutoLoader.php" ); |
| 11 | +require_once( dirname( __FILE__ ) . "/../../phase3/includes/Defines.php" ); # Faster than parsing |
| 12 | +require_once( dirname( __FILE__ ) . "/phase3/includes/AutoLoader.php" ); |
13 | 13 | |
14 | 14 | if ( !extension_loaded( 'sockets' ) ) dl('sockets.so'); |
15 | 15 | if ( !extension_loaded( 'PDO' ) ) dl('pdo.so'); |
— | — | @@ -61,47 +61,47 @@ |
62 | 62 | |
63 | 63 | if ( count( $this->mTokens ) > 0 ) { |
64 | 64 | $globals = array ( |
65 | | - '$wgArticle', # Setup.php |
66 | | - '$wgAutoloadLocalClasses', # AutoLoader.php, a couple of readers |
67 | | - '$wgBlobCache', # HistoryBlob.php |
68 | | - '$wgCaches', # ObjectCache.php |
69 | | - '$wgCanonicalNamespaceNames', # Namespace.phph- |
70 | | - '$wgContLang', # Setup.php |
| 65 | + '$wgArticle', # Setup.php |
| 66 | + '$wgAutoloadLocalClasses', # AutoLoader.php, a couple of readers |
| 67 | + '$wgBlobCache', # HistoryBlob.php |
| 68 | + '$wgCaches', # ObjectCache.php |
| 69 | + '$wgCanonicalNamespaceNames', # Namespace.php |
| 70 | + '$wgContLang', # Setup.php |
71 | 71 | |
72 | | - '$wgContLanguageCode', # Should probably be removed |
73 | | - '$wgDatabase', # For update scripts |
74 | | - '$wgDBcataloged', # http://www.mediawiki.org/wiki/Special:Code/MediaWiki/45755#c7954 |
75 | | - '$wgDeferredUpdateList', # Setup.php |
76 | | - '$wgExternalBlobCache', # ExternalStoreDB.php |
| 72 | + '$wgContLanguageCode', # Should probably be removed |
| 73 | + '$wgDatabase', # For update scripts |
| 74 | + '$wgDBcataloged', # http://www.mediawiki.org/wiki/Special:Code/MediaWiki/45755#c7954 |
| 75 | + '$wgDeferredUpdateList', # Setup.php |
| 76 | + '$wgExternalBlobCache', # ExternalStoreDB.php |
77 | 77 | |
78 | | - '$wgExtModifiedFields', '$wgExtNewFields', '$wgExtNewIndexes', '$wgExtNewTables', # Updates |
| 78 | + '$wgExtModifiedFields', '$wgExtNewFields', '$wgExtNewIndexes', '$wgExtNewTables', # Updates |
79 | 79 | |
80 | | - '$wgFeedClasses', # Defines.php, many uses |
81 | | - '$wgFullyInitialised', # Set by Setup.php, read by Exception |
82 | | - '$wgHtmlEntities', '$wgHtmlEntityAliases', # Sanitizer.php |
83 | | - '$wgIP', # Setup.php |
84 | | - '$wgLang', # Setup.php |
85 | | - '$wgLanguageNames', # Language.php, read by others |
86 | | - '$wgMemc', # Setup.php |
87 | | - '$wgMessageCache', # Setup.php |
| 80 | + '$wgFeedClasses', # Defines.php, many uses |
| 81 | + '$wgFullyInitialised', # Set by Setup.php, read by Exception |
| 82 | + '$wgHtmlEntities', '$wgHtmlEntityAliases', # Sanitizer.php |
| 83 | + '$wgIP', # Setup.php |
| 84 | + '$wgLang', # Setup.php |
| 85 | + '$wgLanguageNames', # Language.php, read by others |
| 86 | + '$wgMemc', # Setup.php |
| 87 | + '$wgMessageCache', # Setup.php |
88 | 88 | |
89 | | - '$wgNoDBParam', # maintenance, serialized |
90 | | - '$wgOut', # Setup.php |
91 | | - '$wgParser', # Setup.php |
92 | | - '$wgPostCommitUpdateList', # Initialised in Setup.php, should be removed |
93 | | - '$wgProfiler', # StartProfiler.php |
94 | | - '$wgProfiling', # Profiler.php |
95 | | - '$wgQueryPages', # QueryPage.php |
96 | | - '$wgRequest', # Setup.php |
97 | | - '$wgRequestTime', # WebStart.php |
98 | | - '$wgRUstart', # WebStart.php, for Profiler stuff |
99 | | - '$wgTitle', # index.php |
100 | | - '$wgUpdates', # updaters |
101 | | - '$wgUseEnotif', # Setup.php |
102 | | - '$wgUseNormalUser', # maintenance |
103 | | - '$wgUser', # Setup.php |
104 | | - '$wgWikiFarm', # maintenance, to be removed |
105 | | - ); |
| 89 | + '$wgNoDBParam', # maintenance, serialized |
| 90 | + '$wgOut', # Setup.php |
| 91 | + '$wgParser', # Setup.php |
| 92 | + '$wgPostCommitUpdateList', # Initialised in Setup.php, should be removed |
| 93 | + '$wgProfiler', # StartProfiler.php |
| 94 | + '$wgProfiling', # Profiler.php |
| 95 | + '$wgQueryPages', # QueryPage.php |
| 96 | + '$wgRequest', # Setup.php |
| 97 | + '$wgRequestTime', # WebStart.php |
| 98 | + '$wgRUstart', # WebStart.php, for Profiler stuff |
| 99 | + '$wgTitle', # index.php |
| 100 | + '$wgUpdates', # updaters |
| 101 | + '$wgUseEnotif', # Setup.php |
| 102 | + '$wgUseNormalUser', # maintenance |
| 103 | + '$wgUser', # Setup.php |
| 104 | + '$wgWikiFarm', # maintenance, to be removed |
| 105 | + ); |
106 | 106 | |
107 | 107 | foreach ( $this->mTokens as $token ) { |
108 | 108 | if ( is_array( $token ) && ($token[0] == T_VARIABLE) && (substr($token[1], 0, 3) == '$wg') ) { |
— | — | @@ -370,7 +370,7 @@ |
371 | 371 | function shouldBeGlobal( $name ) { |
372 | 372 | static $specialGlobals = array( '$IP', '$parserMemc', '$messageMemc', '$hackwhere', '$haveProctitle' ); |
373 | 373 | static $nonGlobals = array( '$wgOptionalMessages', '$wgIgnoredMessages', '$wgEXIFMessages', # Used by Translate extension, read from maintenance/languages/messageTypes.inc |
374 | | - '$wgMessageStructure', '$wgBlockComments' ); # Used by Translate extension, read from maintenance/languages/messages.inc |
| 374 | + '$wgMessageStructure', '$wgBlockComments' ); # Used by Translate extension and maintenance/language/writeMessagesArray.inc, read from maintenance/languages/messages.inc |
375 | 375 | |
376 | 376 | return ( ( substr($name, 0, 3) == '$wg' ) || ( substr($name, 0, 3) == '$eg' ) || in_array( $name, $specialGlobals ) ) && !in_array($name, $nonGlobals); |
377 | 377 | } |