# Attempt to set up the include path, to fix problems with relative includes
$IP = dirname( dirname( __FILE__ ) );
define( 'MW_INSTALL_PATH', $IP );
-$sep = PATH_SEPARATOR;
-if( !ini_set( "include_path", ".$sep$IP$sep$IP/includes$sep$IP/languages" ) ) {
- set_include_path( ".$sep$IP$sep$IP/includes$sep$IP/languages" );
-}
# Define an entry point and include some files
define( "MEDIAWIKI", true );
// Run version checks before including other files
// so people don't see a scary parse error.
-require_once( "install-utils.inc" );
+require_once( "$IP/install-utils.inc" );
install_version_checks();
-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" );
# If we get an exception, the user needs to know
# all the details
}
-require_once( "install-utils.inc" );
-require_once( "maintenance/updaters.inc" );
+require_once( "$IP/install-utils.inc" );
+require_once( "$IP/maintenance/updaters.inc" );
class ConfigData {
function getEncoded( $data ) {
"/opt/csw/bin",
"/usr/gnu/bin",
"/usr/sfw/bin" ),
- explode( $sep, getenv( "PATH" ) ) );
+ explode( PATH_SEPARATOR, getenv( "PATH" ) ) );
$diff3names = array( "gdiff3", "diff3", "diff3.exe" );
$diff3versioninfo = array( '$1 --version 2>&1', 'diff3 (GNU diffutils)' );
$path = ($_SERVER["PHP_SELF"] === '')
? $_SERVER["SCRIPT_NAME"]
: $_SERVER["PHP_SELF"];
+
$conf->ScriptPath = preg_replace( '{^(.*)/config.*$}', '$1', $path );
print "<li>Script URI path: <tt>" . htmlspecialchars( $conf->ScriptPath ) . "</tt></li>\n";
$wgCommandLineMode = true;
$wgUseDatabaseMessages = false; /* FIXME: For database failure */
- require_once( "includes/Setup.php" );
+ require_once( "$IP/includes/Setup.php" );
chdir( "config" );
$wgTitle = Title::newFromText( "Installation script" );
\$path = array( \$IP, \"\$IP/includes\", \"\$IP/languages\" );
set_include_path( implode( PATH_SEPARATOR, \$path ) . PATH_SEPARATOR . get_include_path() );
-require_once( \"includes/DefaultSettings.php\" );
+require_once( \"\$IP/includes/DefaultSettings.php\" );
# If PHP's memory limit is very low, some operations may fail.
" . ($conf->raiseMemory ? '' : '# ' ) . "ini_set( 'memory_limit', '20M' );" . "
}
function getLanguageList() {
- global $wgLanguageNames;
+ global $wgLanguageNames, $IP;
if( !isset( $wgLanguageNames ) ) {
- require_once( "languages/Names.php" );
+ require_once( "$IP/languages/Names.php" );
}
$codes = array();