Extension:Shared codebase/diff 1.11.0

diff -r mediawiki-1.11.0/config/index.php orig/mediawiki-1.11.0/config/index.php 22,23d21 < require_once("../mb_entryPoint.php"); <
 * 1) Added mb_entrypoint.php inclusion

41c39 < require_once( "install-utils.inc" ); --- > require_once( "$IP/install-utils.inc" );
 * 1) remove $IP from includes becuase $IP is an abs path

44,51c42,49 < require_once( "includes/Defines.php" ); < require_once( "includes/DefaultSettings.php" ); < require_once( "includes/AutoLoader.php" ); < require_once( "includes/MagicWord.php" ); < require_once( "includes/Namespace.php" ); < require_once( "includes/ProfilerStub.php" ); < require_once( "includes/GlobalFunctions.php" ); < require_once( "includes/Hooks.php" ); --- > require_once( "$IP/includes/Defines.php" ); > require_once( "$IP/includes/DefaultSettings.php" ); > require_once( "$IP/includes/AutoLoader.php" ); > require_once( "$IP/includes/MagicWord.php" ); > require_once( "$IP/includes/Namespace.php" ); > require_once( "$IP/includes/ProfilerStub.php" ); > require_once( "$IP/includes/GlobalFunctions.php" ); > require_once( "$IP/includes/Hooks.php" );
 * 1) Remove more $IP from incudes

80c78 < 		 --- > 		@import "../skins/monobook/main.css";
 * 1) don't use relative paths except in includes/requires. The PWD is the local
 * 2) instance codebase, so the relative file ../skins/monobook/main.css, probably
 * 3) isn't there.

233,234c231,232 < require_once( "install-utils.inc" ); < require_once( "maintenance/updaters.inc" ); --- > require_once( "$IP/install-utils.inc" ); > require_once( "$IP/maintenance/updaters.inc" );
 * 1) Remove $IP's from includes

diff -r mediawiki-1.11.0/config/index.php5 orig/mediawiki-1.11.0/config/index.php5 4c4 < require 'index.php'; --- > require './index.php';

diff -r mediawiki-1.11.0/img_auth.php5 orig/mediawiki-1.11.0/img_auth.php5 1c1 <  --- > 

diff -r mediawiki-1.11.0/includes/AutoLoader.php orig/mediawiki-1.11.0/includes/AutoLoader.php 356,372c356,358 < 			# Couldn't find it: if it's a language class, < 			# try some other stuff. < 			if(strpos($className, "Language") == 0) < 			{ < 				global $IP, $GMB_CODEBASE; < 				//assume it's in the language-class folder, first < 				$filename = "languages/classes/${className}.php"; < 				if(!file_exists("$IP/$filename") && !file_exists("$GMB_CODEBASE/$filename")) < 				{ < 					//Nope, just include Language and hope for the best. < 					$filename = "languages/Language.php"; < 				} < 			} < 			< 			#Otherwise, just assume it's in includes/ < 			else < 				$filename = "includes/${className}.php"; --- > 			# Give up > 			wfProfileOut( __METHOD__ ); > 			return;
 * 1) Special case for language classes

378d363 < 		//Try to find it locally, first.

380,388c365 < 		$fullpath_filename = "$IP/$filename"; < < 		if(!file_exists($fullpath_filename)) < 		{ < 			//If we can't find the class locally, assume it hasn't been < 			// overloaded, and get it out of the codebase < 			global $GMB_CODEBASE; < 			$filename = "$GMB_CODEBASE/$filename"; < 		} --- > 		$filename = "$IP/$filename";
 * 1) We'll try to find it in the local instance's codebase first, that takes
 * 2) priority. If we can't we'll get it from the master codebase

390c367 < 	require_once( $filename ); --- > 	require( $filename );

diff -r mediawiki-1.11.0/includes/DefaultSettings.php orig/mediawiki-1.11.0/includes/DefaultSettings.php 30c30 < require_once( "includes/SiteConfiguration.php" ); --- > require_once( "$IP/includes/SiteConfiguration.php" );
 * 1) No $IP in includes/requires

diff -r mediawiki-1.11.0/includes/normal/RandomTest.php orig/mediawiki-1.11.0/includes/normal/RandomTest.php 35c35 < require_once( 'includes/DifferenceEngine.php' ); --- > require_once( '../DifferenceEngine.php' );
 * 1) Even though . and .. look like relative paths, they're actually absolute for
 * 2) our purposes, because the . and .. actually represent specific directories
 * 3) relative to the current one. We need to let the include_path decide which
 * 4) one to use

diff -r mediawiki-1.11.0/includes/Setup.php orig/mediawiki-1.11.0/includes/Setup.php 42,43c42,43 < if( $wgStylePath === false ) $wgStylePath = mb_getResource("skins",$wgScriptPath); < if( $wgStyleDirectory === false) $wgStyleDirectory  = mb_getFile("skins"); --- > if( $wgStylePath === false ) $wgStylePath = "$wgScriptPath/skins"; > if( $wgStyleDirectory === false) $wgStyleDirectory  = "$IP/skins";
 * 1) We defined these special functions in mb_entryPoint for a reason, because we
 * 2) need to use them so the local get's priority, but we can still go to the
 * 3) master if we need to.

47,48c47,48 < if( $wgUploadPath === false ) $wgUploadPath = mb_getResource("images",$wgScriptPath); < if( $wgUploadDirectory === false ) $wgUploadDirectory = mb_getFile("images"); --- > if( $wgUploadPath === false ) $wgUploadPath = "$wgScriptPath/images"; > if( $wgUploadDirectory === false ) $wgUploadDirectory = "$IP/images";

118c118 < require_once( "includes/AutoLoader.php" ); --- > require_once( "$IP/includes/AutoLoader.php" );

121c121 < require_once( "includes/Exception.php" ); --- > require_once( "$IP/includes/Exception.php" );

126,132c126,132 < require_once( "includes/GlobalFunctions.php" ); < require_once( "includes/Hooks.php" ); < require_once( "includes/Namespace.php" ); < require_once( "includes/ProxyTools.php" ); < require_once( "includes/ObjectCache.php" ); < require_once( "includes/ImageFunctions.php" ); < require_once( "includes/StubObject.php" ); --- > require_once( "$IP/includes/GlobalFunctions.php" ); > require_once( "$IP/includes/Hooks.php" ); > require_once( "$IP/includes/Namespace.php" ); > require_once( "$IP/includes/ProxyTools.php" ); > require_once( "$IP/includes/ObjectCache.php" ); > require_once( "$IP/includes/ImageFunctions.php" ); > require_once( "$IP/includes/StubObject.php" );

diff -r mediawiki-1.11.0/includes/WebStart.php orig/mediawiki-1.11.0/includes/WebStart.php 69c69 < require_once( 'StartProfiler.php' ); --- > require_once( './StartProfiler.php' );
 * 1) More of these pseudo-absolute paths.

73c73 < require_once( 'includes/Defines.php' ); --- > require_once( './includes/Defines.php' );

78c78 < if( !file_exists( ('LocalSettings.php') ) ) { --- > if( !file_exists( './LocalSettings.php' ) ) {

80,81c80,81 < 	require_once( 'includes/DefaultSettings.php' ); # used for printing the version < 	require_once( 'includes/templates/NoLocalSettings.php' ); --- > 	require_once( './includes/DefaultSettings.php' ); # used for printing the version > 	require_once( './includes/templates/NoLocalSettings.php' );

86c86 < require_once( 'LocalSettings.php' ); --- > require_once( './LocalSettings.php' );

95c95 < 	require_once( 'includes/OutputHandler.php' ); --- > 	require_once( './includes/OutputHandler.php' );

102c102 < 	require_once( 'includes/Setup.php' ); --- > 	require_once( './includes/Setup.php' );

diff -r mediawiki-1.11.0/index.php orig/mediawiki-1.11.0/index.php 35,36d34 < //make this a valid entry point for a web access, and include some real basic functions < // which are going to let us do local overrides.

38d35 < require_once("mb_entryPoint.php");

41c38 < require_once( 'includes/WebStart.php' ); --- > require_once( './includes/WebStart.php' );

diff -r mediawiki-1.11.0/index.php5 orig/mediawiki-1.11.0/index.php5 1c1 <  --- > 

diff -r mediawiki-1.11.0/languages/Language.php orig/mediawiki-1.11.0/languages/Language.php 343c343 < 		$dir = opendir( mb_getFile("languages/messages") ); --- > 		$dir = opendir( "$IP/languages/messages" );

1567c1567 < 		return mb_getFile($prefix . str_replace( '-', '_', ucfirst( $code ) ) . $suffix); --- > 		return $prefix. str_replace( '-', '_', ucfirst( $code ) ). $suffix;

1572c1572 < 		return self::getFileName( "languages/messages/Messages", $code, '.php' ); --- > 		return self::getFileName( "$IP/languages/messages/Messages", $code, '.php' );

1577c1577 < 		return self::getFileName( "languages/classes/Language", $code, '.php' ); --- > 		return self::getFileName( "$IP/languages/classes/Language", $code, '.php' );

diff -r mediawiki-1.11.0/LocalSettings.php orig/mediawiki-1.11.0/LocalSettings.php 19c19,22 < require_once( "includes/DefaultSettings.php" ); --- > $path = array( $IP, "$IP/includes", "$IP/languages" ); > set_include_path( implode( PATH_SEPARATOR, $path ) . PATH_SEPARATOR . get_include_path ); > > require_once( "$IP/includes/DefaultSettings.php" );
 * 1) We're configuring the path in mbEntryPoint.php, instead of LocalSettings.

diff -r mediawiki-1.11.0/maintenance/updaters.inc orig/mediawiki-1.11.0/maintenance/updaters.inc 17c17 < require_once( "includes/Hooks.php" ); --- > require_once( "$IP/includes/Hooks.php" );

diff -r mediawiki-1.11.0/profileinfo.php orig/mediawiki-1.11.0/profileinfo.php 50,51c50,51 < require_once( 'includes/WebStart.php' ); < require_once("AdminSettings.php"); --- > require_once( './includes/WebStart.php' ); > require_once("./AdminSettings.php");

diff -r mediawiki-1.11.0/redirect.php orig/mediawiki-1.11.0/redirect.php 2c2 < require_once( 'includes/WebStart.php' ); --- > require_once( './includes/WebStart.php' );

diff -r mediawiki-1.11.0/redirect.php5 orig/mediawiki-1.11.0/redirect.php5 1c1 <  --- > 

diff -r mediawiki-1.11.0/thumb.php orig/mediawiki-1.11.0/thumb.php 9c9 < require_once( 'includes/WebStart.php' ); --- > require_once( './includes/WebStart.php' );

diff -r mediawiki-1.11.0/thumb.php5 orig/mediawiki-1.11.0/thumb.php5 1c1 <  --- > 

diff -r mediawiki-1.11.0/trackback.php orig/mediawiki-1.11.0/trackback.php 6,7c6,7 < require_once( 'includes/WebStart.php' ); < require_once( 'includes/DatabaseFunctions.php' ); --- > require_once( './includes/WebStart.php' ); > require_once( './includes/DatabaseFunctions.php' );