r22798 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r22797‎ | r22798 | r22799 >
Date:16:01, 6 June 2007
Author:brion
Status:old
Tags:
Comment:
* Skip additional setting of include_path in commandLine.inc (for non-Wikimedia mode)
* Fix some scripts that assumed include_path was set with various additional directories
Stuff now seems to mostly work when not overriding include_path.
Taking that out of LocalSettings is the next step... whee!
Modified paths:
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)
  • /trunk/phase3/includes/ExternalStore.php (modified) (history)
  • /trunk/phase3/includes/SpecialRecentchanges.php (modified) (history)
  • /trunk/phase3/languages/classes/LanguageZh.php (modified) (history)
  • /trunk/phase3/maintenance/commandLine.inc (modified) (history)
  • /trunk/phase3/maintenance/dumpBackup.php (modified) (history)
  • /trunk/phase3/maintenance/dumpReplayLog.php (modified) (history)
  • /trunk/phase3/maintenance/dumpTextPass.php (modified) (history)
  • /trunk/phase3/maintenance/importDump.php (modified) (history)
  • /trunk/phase3/maintenance/importUseModWiki.php (modified) (history)
  • /trunk/phase3/maintenance/mcc.php (modified) (history)
  • /trunk/phase3/maintenance/renderDump.php (modified) (history)
  • /trunk/phase3/skins/Chick.deps.php (modified) (history)
  • /trunk/phase3/skins/MonoBook.deps.php (modified) (history)
  • /trunk/phase3/skins/MonoBook.php (modified) (history)
  • /trunk/phase3/skins/MySkin.deps.php (modified) (history)
  • /trunk/phase3/skins/Simple.deps.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/mcc.php
@@ -8,7 +8,6 @@
99
1010 /** */
1111 require_once( 'commandLine.inc' );
12 -require_once( 'memcached-client.php' );
1312
1413 $mcc = new memcached( array('persistant' => true/*, 'debug' => true*/) );
1514 $mcc->set_servers( $wgMemCachedServers );
Index: trunk/phase3/maintenance/dumpReplayLog.php
@@ -6,7 +6,6 @@
77
88 /** */
99 require_once( "commandLine.inc" );
10 -require_once( 'includes/SpecialExport.php' );
1110
1211 /** */
1312 function dumpReplayLog( $start ) {
Index: trunk/phase3/maintenance/importDump.php
@@ -24,7 +24,6 @@
2525 $optionsWithArgs = array( 'report' );
2626
2727 require_once( 'commandLine.inc' );
28 -require_once( 'SpecialImport.php' );
2928
3029 class BackupReader {
3130 var $reportingInterval = 100;
Index: trunk/phase3/maintenance/importUseModWiki.php
@@ -45,7 +45,7 @@
4646 $FS3 = $FS."3" ;
4747
4848 # Unicode sanitization tools
49 -require_once( '../includes/normal/UtfNormal.php' );
 49+require_once( dirname( dirname( __FILE__ ) ) . '/includes/normal/UtfNormal.php' );
5050
5151 $usercache = array();
5252
Index: trunk/phase3/maintenance/commandLine.inc
@@ -179,7 +179,7 @@
180180 #require_once( $IP.'/includes/ProfilerStub.php' );
181181 require_once( $IP.'/includes/Defines.php' );
182182 require_once( $settingsFile );
183 - ini_set( 'include_path', ".$sep$IP$sep$IP/includes$sep$IP/languages$sep$IP/maintenance" );
 183+ /* ini_set( 'include_path', ".$sep$IP$sep$IP/includes$sep$IP/languages$sep$IP/maintenance" ); */
184184
185185 if ( is_readable( $IP.'/AdminSettings.php' ) ) {
186186 require_once( $IP.'/AdminSettings.php' );
@@ -214,8 +214,8 @@
215215
216216 $wgShowSQLErrors = true;
217217
218 -require_once( 'Setup.php' );
219 -require_once( 'install-utils.inc' );
 218+require_once( "$IP/includes/Setup.php" );
 219+require_once( "$IP/install-utils.inc" );
220220 $wgTitle = null; # Much much faster startup than creating a title object
221221 set_time_limit(0);
222222
Index: trunk/phase3/maintenance/renderDump.php
@@ -2,7 +2,7 @@
33 /**
44 * Take page text out of an XML dump file and render basic HTML out to files.
55 * This is *NOT* suitable for publishing or offline use; it's intended for
6 - * running comparitive tests of parsing behavior using real-world data.
 6+ * running comparative tests of parsing behavior using real-world data.
77 *
88 * Templates etc are pulled from the local wiki database, not from the dump.
99 *
@@ -30,7 +30,6 @@
3131 $optionsWithArgs = array( 'report' );
3232
3333 require_once( 'commandLine.inc' );
34 -require_once( 'SpecialImport.php' );
3534
3635 class DumpRenderer {
3736 function __construct( $dir ) {
Index: trunk/phase3/maintenance/dumpBackup.php
@@ -26,8 +26,7 @@
2727 $optionsWithArgs = array( 'pagelist', 'start', 'end' );
2828
2929 require_once( 'commandLine.inc' );
30 -require_once( 'SpecialExport.php' );
31 -require_once( 'maintenance/backup.inc' );
 30+require_once( 'backup.inc' );
3231
3332 $dumper = new BackupDumper( $argv );
3433
Index: trunk/phase3/maintenance/dumpTextPass.php
@@ -24,8 +24,7 @@
2525 $originalDir = getcwd();
2626
2727 require_once( 'commandLine.inc' );
28 -require_once( 'SpecialExport.php' );
29 -require_once( 'maintenance/backup.inc' );
 28+require_once( 'backup.inc' );
3029
3130 /**
3231 * Stream wrapper around 7za filter program.
Index: trunk/phase3/skins/MySkin.deps.php
@@ -8,6 +8,6 @@
99 if ( ! defined( 'MEDIAWIKI' ) )
1010 die( 1 );
1111
12 -require_once('includes/SkinTemplate.php');
 12+require_once( dirname( dirname( __FILE__ ) ) . '/includes/SkinTemplate.php');
1313 require_once( dirname(__FILE__) . '/MonoBook.php' );
1414 ?>
Index: trunk/phase3/skins/Chick.deps.php
@@ -8,6 +8,6 @@
99 if ( ! defined( 'MEDIAWIKI' ) )
1010 die( 1 );
1111
12 -require_once('includes/SkinTemplate.php');
 12+require_once( dirname( dirname( __FILE__ ) ) . '/includes/SkinTemplate.php');
1313 require_once( dirname(__FILE__) . '/MonoBook.php' );
1414 ?>
Index: trunk/phase3/skins/MonoBook.deps.php
@@ -8,5 +8,5 @@
99 if ( ! defined( 'MEDIAWIKI' ) )
1010 die( 1 );
1111
12 -require_once('includes/SkinTemplate.php');
 12+require_once( dirname( dirname( __FILE__ ) ) . '/includes/SkinTemplate.php');
1313 ?>
Index: trunk/phase3/skins/Simple.deps.php
@@ -8,6 +8,6 @@
99 if ( ! defined( 'MEDIAWIKI' ) )
1010 die( 1 );
1111
12 -require_once('includes/SkinTemplate.php');
 12+require_once( dirname( dirname( __FILE__ ) ) . '/includes/SkinTemplate.php');
1313 require_once( dirname(__FILE__) . '/MonoBook.php' );
1414 ?>
Index: trunk/phase3/skins/MonoBook.php
@@ -12,9 +12,6 @@
1313 if( !defined( 'MEDIAWIKI' ) )
1414 die( -1 );
1515
16 -/** */
17 -require_once('includes/SkinTemplate.php');
18 -
1916 /**
2017 * Inherit main code from SkinTemplate, set the CSS and template filter.
2118 * @todo document
Index: trunk/phase3/includes/SpecialRecentchanges.php
@@ -269,8 +269,6 @@
270270 }
271271
272272 function rcFilterByCategories ( &$rows , $categories , $any ) {
273 - require_once ( 'Categoryfinder.php' ) ;
274 -
275273 # Filter categories
276274 $cats = array () ;
277275 foreach ( $categories AS $cat ) {
Index: trunk/phase3/includes/ExternalStore.php
@@ -41,10 +41,9 @@
4242 return false;
4343
4444 $class='ExternalStore'.ucfirst($proto);
45 - /* Preloaded modules might exist, especially ones serving multiple protocols */
 45+ /* Any custom modules should be added to $wgAutoLoadClasses for on-demand loading */
4646 if (!class_exists($class)) {
47 - if (!include_once($class.'.php'))
48 - return false;
 47+ return false;
4948 }
5049 $store=new $class();
5150 return $store;
Index: trunk/phase3/includes/DefaultSettings.php
@@ -27,7 +27,7 @@
2828 * Create a site configuration object
2929 * Not used for much in a default install
3030 */
31 -require_once( 'includes/SiteConfiguration.php' );
 31+require_once( "$IP/includes/SiteConfiguration.php" );
3232 $wgConf = new SiteConfiguration;
3333
3434 /** MediaWiki version number */
Index: trunk/phase3/languages/classes/LanguageZh.php
@@ -7,7 +7,7 @@
88
99 class ZhConverter extends LanguageConverter {
1010 function loadDefaultTables() {
11 - require( "includes/ZhConversion.php" );
 11+ require( dirname(__FILE__)."/../../includes/ZhConversion.php" );
1212 $this->mTables = array(
1313 'zh-cn' => new ReplacementArray( $zh2CN ),
1414 'zh-tw' => new ReplacementArray( $zh2TW ),

Follow-up revisions

RevisionCommit summaryAuthorDate
r22811Merged revisions 22791-22810 via svnmerge from...david07:26, 7 June 2007

Status & tagging log