summaryrefslogtreecommitdiff
path: root/config/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'config/index.php')
-rw-r--r--config/index.php291
1 files changed, 216 insertions, 75 deletions
diff --git a/config/index.php b/config/index.php
index e719e47e..274a1531 100644
--- a/config/index.php
+++ b/config/index.php
@@ -29,10 +29,6 @@ $wgRequestTime = microtime( true );
# 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 );
@@ -40,14 +36,21 @@ define( "MEDIAWIKI_INSTALL", 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/MagicWord.php" );
-require_once( "includes/Namespace.php" );
-require_once( "includes/ProfilerStub.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
+$wgShowExceptionDetails = true;
## Databases we support:
@@ -146,6 +149,15 @@ $ourdb['postgres']['rootuser'] = 'postgres';
font-size: 85%;
padding-top: 3em;
}
+
+ span.success-message {
+ font-weight: bold;
+ font-size: 110%;
+ color: green;
+ }
+ .success-box {
+ font-size: 130%;
+ }
</style>
<script type="text/javascript">
@@ -185,7 +197,8 @@ $ourdb['postgres']['rootuser'] = 'postgres';
/* Check for existing configurations and bug out! */
if( file_exists( "../LocalSettings.php" ) ) {
- dieout( "<p><strong>Setup has completed, <a href='../index.php'>your wiki</a> is configured.</strong></p>
+ $script = defined('MW_INSTALL_PHP5_EXT') ? 'index.php5' : 'index.php';
+ dieout( "<p><strong>Setup has completed, <a href='../$script'>your wiki</a> is configured.</strong></p>
<p>Please delete the /config directory for extra security.</p></div></div></div></div>" );
}
@@ -215,8 +228,8 @@ if( !is_writable( "." ) ) {
}
-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 ) {
@@ -227,21 +240,26 @@ class ConfigData {
function getSysopName() { return $this->getEncoded( $this->SysopName ); }
function getSysopPass() { return $this->getEncoded( $this->SysopPass ); }
- function setSchema( $schema ) {
+ function setSchema( $schema, $engine ) {
$this->DBschema = $schema;
+ if ( !preg_match( '/^\w*$/', $engine ) ){
+ $engine = 'InnoDB';
+ }
switch ( $this->DBschema ) {
case 'mysql5':
- $this->DBTableOptions = 'ENGINE=InnoDB, DEFAULT CHARSET=utf8';
+ $this->DBTableOptions = "ENGINE=$engine, DEFAULT CHARSET=utf8";
$this->DBmysql5 = 'true';
break;
case 'mysql5-binary':
- $this->DBTableOptions = 'ENGINE=InnoDB, DEFAULT CHARSET=binary';
+ $this->DBTableOptions = "ENGINE=$engine, DEFAULT CHARSET=binary";
$this->DBmysql5 = 'true';
break;
default:
- $this->DBTableOptions = 'TYPE=InnoDB';
+ $this->DBTableOptions = "TYPE=$engine";
$this->DBmysql5 = 'false';
}
+ $this->DBengine = $engine;
+
# Set the global for use during install
global $wgDBTableOptions;
$wgDBTableOptions = $this->DBTableOptions;
@@ -269,22 +287,20 @@ define( 'MW_NO_OUTPUT_BUFFER', 1 );
$conf = new ConfigData;
install_version_checks();
+$self = 'Installer'; # Maintenance script name, to please Setup.php
print "<li>PHP " . phpversion() . " installed</li>\n";
-## Temporarily turn off all errors as we try to discover installed databases
-$olderrnum = error_reporting(0);
-
+error_reporting( 0 );
$phpdatabases = array();
foreach (array_keys($ourdb) as $db) {
$compname = $ourdb[$db]['compile'];
- if (extension_loaded($compname) or dl($compname . '.' . PHP_SHLIB_SUFFIX)) {
+ if( extension_loaded( $compname ) || ( mw_have_dl() && dl( "{$compname}." . PHP_SHLIB_SUFFIX ) ) ) {
array_push($phpdatabases, $db);
$ourdb[$db]['havedriver'] = 1;
}
}
-
-error_reporting($olderrornum);
+error_reporting( E_ALL );
if (!$phpdatabases) {
print "Could not find a suitable database driver!<ul>";
@@ -298,15 +314,16 @@ if (!$phpdatabases) {
}
print "<li>Found database drivers for:";
+$DefaultDBtype = '';
foreach (array_keys($ourdb) AS $db) {
if ($ourdb[$db]['havedriver']) {
- $DefaultDBtype = $db;
+ if ( $DefaultDBtype == '' ) {
+ $DefaultDBtype = $db;
+ }
print " ".$ourdb[$db]['fullname'];
}
}
print "</li>\n";
-if (count($phpdatabases) != 1)
- $DefaultDBtype = '';
if( ini_get( "register_globals" ) ) {
?>
@@ -373,10 +390,11 @@ if( ini_get( "safe_mode" ) ) {
$sapi = php_sapi_name();
print "<li>PHP server API is $sapi; ";
+$script = defined('MW_INSTALL_PHP5_EXT') ? 'index.php5' : 'index.php';
if( $wgUsePathInfo ) {
- print "ok, using pretty URLs (<tt>index.php/Page_Title</tt>)";
+ print "ok, using pretty URLs (<tt>$script/Page_Title</tt>)";
} else {
- print "using ugly URLs (<tt>index.php?title=Page_Title</tt>)";
+ print "using ugly URLs (<tt>$script?title=Page_Title</tt>)";
}
print "</li>\n";
@@ -445,6 +463,10 @@ if ( $conf->turck ) {
print "<li><a href=\"http://turck-mmcache.sourceforge.net/\">Turck MMCache</a> installed</li>\n";
}
+$conf->xcache = function_exists( 'xcache_get' );
+if( $conf->xcache )
+ print "<li><a href=\"http://trac.lighttpd.net/xcache/\">XCache</a> installed</li>";
+
$conf->apc = function_exists('apc_fetch');
if ($conf->apc ) {
print "<li><a href=\"http://www.php.net/apc\">APC</a> installed</li>";
@@ -456,10 +478,11 @@ if ( $conf->eaccel ) {
print "<li><a href=\"http://eaccelerator.sourceforge.net/\">eAccelerator</a> installed</li>\n";
}
-if( !$conf->turck && !$conf->eaccel && !$conf->apc ) {
+if( !( $conf->turck || $conf->eaccel || $conf->apc || $conf->xcache ) ) {
echo( '<li>Couldn\'t find <a href="http://turck-mmcache.sourceforge.net">Turck MMCache</a>,
- <a href="http://eaccelerator.sourceforge.net">eAccelerator</a>, or
- <a href="http://www.php.net/apc">APC</a>. Object caching functions cannot be used.</li>' );
+ <a href="http://eaccelerator.sourceforge.net">eAccelerator</a>,
+ <a href="http://www.php.net/apc">APC</a> or <a href="http://trac.lighttpd.net/xcache/">XCache</a>;
+ cannot use these for object caching.</li>' );
}
$conf->diff3 = false;
@@ -470,7 +493,7 @@ $diff3locations = array_merge(
"/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)' );
@@ -521,9 +544,22 @@ print "<li>Installation directory: <tt>" . htmlspecialchars( $conf->IP ) . "</tt
$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";
+
+
+// We may be installing from *.php5 extension file, if so, print message
+$conf->ScriptExtension = '.php';
+if (defined('MW_INSTALL_PHP5_EXT')) {
+ $conf->ScriptExtension = '.php5';
+ print "<li>Installing MediaWiki with <tt>php5</tt> file extensions</li>\n";
+} else {
+ print "<li>Installing MediaWiki with <tt>php</tt> file extensions</li>\n";
+}
+
+
print "<li style='font-weight:bold;color:green;font-size:110%'>Environment checked. You can install MediaWiki.</li>\n";
$conf->posted = ($_SERVER["REQUEST_METHOD"] == "POST");
@@ -547,11 +583,13 @@ print "<li style='font-weight:bold;color:green;font-size:110%'>Environment check
$conf->RootUser = importPost( "RootUser", "root" );
$conf->RootPW = importPost( "RootPW", "" );
$useRoot = importCheck( 'useroot', false );
+ $conf->LanguageCode = importPost( "LanguageCode", "en" );
## MySQL specific:
$conf->DBprefix = importPost( "DBprefix" );
- $conf->setSchema( importPost( "DBschema", "mysql4" ) );
- $conf->LanguageCode = importPost( "LanguageCode", "en" );
+ $conf->setSchema(
+ importPost( "DBschema", "mysql4" ),
+ importPost( "DBengine", "InnoDB" ) );
## Postgres specific:
$conf->DBport = importPost( "DBport", "5432" );
@@ -580,11 +618,47 @@ if( !preg_match( '/^[A-Za-z_0-9]*$/', $conf->DBprefix ) ) {
$errs["DBprefix"] = "Invalid table prefix";
}
-if( $conf->SysopPass == "" ) {
- $errs["SysopPass"] = "Must not be blank";
-}
-if( $conf->SysopPass != $conf->SysopPass2 ) {
- $errs["SysopPass2"] = "Passwords don't match!";
+error_reporting( E_ALL );
+
+/**
+ * Initialise $wgLang and $wgContLang to something so we can
+ * call case-folding methods. Per Brion, this is English for
+ * now, although we could be clever and initialise to the
+ * user-selected language.
+ */
+$wgContLang = Language::factory( 'en' );
+$wgLang = $wgContLang;
+
+/**
+ * We're messing about with users, so we need a stub
+ * authentication plugin...
+ */
+$wgAuth = new AuthPlugin();
+
+/**
+ * Validate the initial administrator account; username,
+ * password checks, etc.
+ */
+if( $conf->SysopName ) {
+ # Check that the user can be created
+ $u = User::newFromName( $conf->SysopName );
+ if( is_a($u, 'User') ) { // please do not use instanceof, it breaks PHP4
+ # Various password checks
+ if( $conf->SysopPass != '' ) {
+ if( $conf->SysopPass == $conf->SysopPass2 ) {
+ if( !$u->isValidPassword( $conf->SysopPass ) ) {
+ $errs['SysopPass'] = "Bad password";
+ }
+ } else {
+ $errs['SysopPass2'] = "Passwords don't match";
+ }
+ } else {
+ $errs['SysopPass'] = "Cannot be blank";
+ }
+ unset( $u );
+ } else {
+ $errs['SysopName'] = "Bad username";
+ }
}
$conf->License = importRequest( "License", "none" );
@@ -678,7 +752,7 @@ if( $conf->posted && ( 0 == count( $errs ) ) ) {
$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" );
@@ -839,7 +913,6 @@ if( $conf->posted && ( 0 == count( $errs ) ) ) {
print "<li>There are already MediaWiki tables in this database. Checking if updates are needed...</li>\n";
if ( $conf->DBtype == 'mysql') {
-
# Determine existing default character set
if ( $wgDatabase->tableExists( "revision" ) ) {
$revision = $wgDatabase->escapeLike( $conf->DBprefix . 'revision' );
@@ -848,21 +921,35 @@ if( $conf->posted && ( 0 == count( $errs ) ) ) {
if ( !$row ) {
echo "<li>SHOW TABLE STATUS query failed!</li>\n";
$existingSchema = false;
- } elseif ( preg_match( '/^latin1/', $row->Collation ) ) {
- $existingSchema = 'mysql4';
- } elseif ( preg_match( '/^utf8/', $row->Collation ) ) {
- $existingSchema = 'mysql5';
- } elseif ( preg_match( '/^binary/', $row->Collation ) ) {
- $existingSchema = 'mysql5-binary';
+ $existingEngine = false;
} else {
- $existingSchema = false;
- echo "<li><strong>Warning:</strong> Unrecognised existing collation</li>\n";
+ if ( preg_match( '/^latin1/', $row->Collation ) ) {
+ $existingSchema = 'mysql4';
+ } elseif ( preg_match( '/^utf8/', $row->Collation ) ) {
+ $existingSchema = 'mysql5';
+ } elseif ( preg_match( '/^binary/', $row->Collation ) ) {
+ $existingSchema = 'mysql5-binary';
+ } else {
+ $existingSchema = false;
+ echo "<li><strong>Warning:</strong> Unrecognised existing collation</li>\n";
+ }
+ if ( isset( $row->Engine ) ) {
+ $existingEngine = $row->Engine;
+ } else {
+ $existingEngine = $row->Type;
+ }
}
if ( $existingSchema && $existingSchema != $conf->DBschema ) {
print "<li><strong>Warning:</strong> you requested the {$conf->DBschema} schema, " .
"but the existing database has the $existingSchema schema. This upgrade script ".
"can't convert it, so it will remain $existingSchema.</li>\n";
- $conf->setSchema( $existingSchema );
+ $conf->setSchema( $existingSchema, $conf->DBengine );
+ }
+ if ( $existingEngine && $existingEngine != $conf->DBengine ) {
+ print "<li><strong>Warning:</strong> you requested the {$conf->DBengine} storage " .
+ "engine, but the existing database uses the $existingEngine engine. This upgrade " .
+ "script can't convert it, so it will remain $existingEngine.</li>\n";
+ $conf->setSchema( $conf->DBschema, $existingEngine );
}
}
@@ -890,6 +977,24 @@ if( $conf->posted && ( 0 == count( $errs ) ) ) {
print "</pre>\n";
print "<ul><li>Finished update checks.</li>\n";
} else {
+ # Determine available storage engines if possible
+ if ( $conf->DBtype == 'mysql' && version_compare( $myver, "4.1.2", "ge" ) ) {
+ $res = $wgDatabase->query( 'SHOW ENGINES' );
+ $found = false;
+ while ( $row = $wgDatabase->fetchObject( $res ) ) {
+ if ( $row->Engine == $conf->DBengine ) {
+ $found = true;
+ break;
+ }
+ }
+ $wgDatabase->freeResult( $res );
+ if ( !$found && $conf->DBengine != 'MyISAM' ) {
+ echo "<li><strong>Warning:</strong> {$conf->DBengine} storage engine not available, " .
+ "using MyISAM instead</li>\n";
+ $conf->setSchema( $conf->DBschema, 'MyISAM' );
+ }
+ }
+
# FIXME: Check for errors
print "<li>Creating tables...";
if ($conf->DBtype == 'mysql') {
@@ -967,7 +1072,7 @@ if( $conf->posted && ( 0 == count( $errs ) ) ) {
/* Write out the config file now that all is well */
print "<li style=\"list-style: none\">\n";
print "<p>Creating LocalSettings.php...</p>\n\n";
- $localSettings = "<" . "?php$endl$local$endl\r\n";
+ $localSettings = "<" . "?php$endl$local";
// Fix up a common line-ending problem (due to CVS on Windows)
$localSettings = str_replace( "\r\n", "\n", $localSettings );
$f = fopen( "LocalSettings.php", 'xt' );
@@ -979,13 +1084,13 @@ if( $conf->posted && ( 0 == count( $errs ) ) ) {
}
if(fwrite( $f, $localSettings ) ) {
fclose( $f );
+ print "</li></ul><hr/>\n";
writeSuccessMessage();
} else {
fclose( $f );
die("<p class='error'>An error occured while writing the config/LocalSettings.php file. Check user rights and disk space then try again.</p>\n");
-
+ print "</li></ul>\n";
}
- print "</li>\n";
} while( false );
}
@@ -1003,7 +1108,7 @@ if( count( $errs ) ) {
}
?>
-<form action="index.php" name="config" method="post">
+<form action="<?php echo defined('MW_INSTALL_PHP5_EXT') ? 'index.php5' : 'index.php'; ?>" name="config" method="post">
<h2>Site config</h2>
@@ -1054,7 +1159,8 @@ if( count( $errs ) ) {
<li><?php
aField( $conf, "License", "A Creative Commons license - ", "radio", "cc" );
$partner = "MediaWiki";
- $exit = urlencode( "$wgServer{$conf->ScriptPath}/config/index.php?License=cc&RightsUrl=[license_url]&RightsText=[license_name]&RightsCode=[license_code]&RightsIcon=[license_button]" );
+ $script = defined('MW_INSTALL_PHP5_EXT') ? 'index.php5' : 'index.php';
+ $exit = urlencode( "$wgServer{$conf->ScriptPath}/config/$script?License=cc&RightsUrl=[license_url]&RightsText=[license_name]&RightsCode=[license_code]&RightsIcon=[license_button]" );
$icon = urlencode( "$wgServer$wgUploadPath/wiki.png" );
$ccApp = htmlspecialchars( "http://creativecommons.org/license/?partner=$partner&exit_url=$exit&partner_icon_url=$icon" );
print "<a href=\"$ccApp\" target='_blank'>choose</a>";
@@ -1087,6 +1193,8 @@ if( count( $errs ) ) {
<p class="config-desc">
An admin can lock/delete pages, block users from editing, and do other maintenance tasks.<br />
A new account will be added only when creating a new wiki database.
+ <br /><br />
+ The password cannot be the same as the username.
</p>
<div class="config-input">
@@ -1100,6 +1208,11 @@ if( count( $errs ) ) {
aField( $conf, "Shm", "Turck MMCache", "radio", "turck" );
echo "</li>";
}
+ if( $conf->xcache ) {
+ echo( '<li>' );
+ aField( $conf, 'Shm', 'XCache', 'radio', 'xcache' );
+ echo( '</li>' );
+ }
if ( $conf->apc ) {
echo "<li>";
aField( $conf, "Shm", "APC", "radio", "apc" );
@@ -1116,10 +1229,11 @@ if( count( $errs ) ) {
<div style="clear:left"><?php aField( $conf, "MCServers", "Memcached servers:", "text" ) ?></div>
</div>
<p class="config-desc">
- Using a shared memory system such as Turck MMCache, APC, eAccelerator, or Memcached
- will speed up MediaWiki significantly. Memcached is the best solution but needs to be
- installed. Specify the server addresses and ports in a comma-separated list. Only
- use Turck shared memory if the wiki will be running on a single Apache server.
+ An object caching system such as memcached will provide a significant performance boost,
+ but needs to be installed. Provide the server addresses and ports in a comma-separated list.
+ <br /><br />
+ MediaWiki can also detect and support eAccelerator, Turck MMCache, APC, and XCache, but
+ these should not be used if the wiki will be running on multiple application servers.
</p>
</div>
@@ -1249,7 +1363,19 @@ if( count( $errs ) ) {
<p>Avoid exotic characters; something like <tt>mw_</tt> is good.</p>
</div>
- <div class="config-input"><label class="column">Database charset</label>
+ <div class="config-input"><label class="column">Storage Engine</label>
+ <div>Select one:</div>
+ <ul class="plain">
+ <li><?php aField( $conf, "DBengine", "InnoDB", "radio", "InnoDB" ); ?></li>
+ <li><?php aField( $conf, "DBengine", "MyISAM", "radio", "MyISAM" ); ?></li>
+ </ul>
+ </div>
+ <p class="config-desc">
+ InnoDB is best for public web installations, since it has good concurrency
+ support. MyISAM may be faster in single-user installations. MyISAM databases
+ tend to get corrupted more often than InnoDB databases.
+ </p>
+ <div class="config-input"><label class="column">Database character set</label>
<div>Select one:</div>
<ul class="plain">
<li><?php aField( $conf, "DBschema", "Backwards-compatible UTF-8", "radio", "mysql4" ); ?></li>
@@ -1280,7 +1406,7 @@ if( count( $errs ) ) {
so it is recommended that you create a new user. The above schemas are generally correct:
only change them if you are sure you need to.</p>
</div>
- </div>
+ </fieldset>
<div class="config-input" style="padding:2em 0 3em">
<label class='column'>&nbsp;</label>
@@ -1304,24 +1430,35 @@ window.onload = toggleDBarea('<?php echo $conf->DBtype; ?>',
/* -------------------------------------------------------------------------------------- */
function writeSuccessMessage() {
+ $script = defined('MW_INSTALL_PHP5_EXT') ? 'index.php5' : 'index.php';
if ( ini_get( 'safe_mode' ) && !ini_get( 'open_basedir' ) ) {
echo <<<EOT
+<div class="success-box">
<p>Installation successful!</p>
<p>To complete the installation, please do the following:
<ol>
<li>Download config/LocalSettings.php with your FTP client or file manager</li>
<li>Upload it to the parent directory</li>
<li>Delete config/LocalSettings.php</li>
- <li>Start using <a href='../index.php'>your wiki</a>!
+ <li>Start using <a href='../$script'>your wiki</a>!
</ol>
<p>If you are in a shared hosting environment, do <strong>not</strong> just move LocalSettings.php
remotely. LocalSettings.php is currently owned by the user your webserver is running under,
which means that anyone on the same server can read your database password! Downloading
it and uploading it again will hopefully change the ownership to a user ID specific to you.</p>
+</div>
EOT;
} else {
- echo "<p><span style='font-weight:bold;color:green;font-size:110%'>Installation successful!</span> Move the <tt>config/LocalSettings.php</tt> file into the parent directory, then follow
- <strong><a href='../index.php'>this link</a></strong> to your wiki.</p>\n";
+ echo <<<EOT
+<div class="success-box">
+<p>
+<span class="success-message">Installation successful!</span>
+Move the <tt>config/LocalSettings.php</tt> file to the parent directory, then follow
+<a href="../$script"> this link</a> to your wiki.</p>
+<p>You should change file permissions for <tt>LocalSettings.php</tt> as required to
+prevent other users on the server reading passwords and altering configuration data.</p>
+</div>
+EOT;
}
}
@@ -1351,6 +1488,7 @@ function writeLocalSettings( $conf ) {
$mcservers = var_export( $conf->MCServerArray, true );
break;
case 'turck':
+ case 'xcache':
case 'apc':
case 'eaccel':
$cacheType = 'CACHE_ACCEL';
@@ -1425,7 +1563,7 @@ if( defined( 'MW_INSTALL_PATH' ) ) {
\$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' );" . "
@@ -1443,6 +1581,7 @@ if ( \$wgCommandLineMode ) {
## The URL base path to the directory containing the wiki;
## defaults for all runtime URL paths are based off of this.
\$wgScriptPath = \"{$slconf['ScriptPath']}\";
+\$wgScriptExtension = \"{$slconf['ScriptExtension']}\";
## For more information on customizing the URLs please see:
## http://www.mediawiki.org/wiki/Manual:Short_URL
@@ -1454,7 +1593,8 @@ if ( \$wgCommandLineMode ) {
\$wgPasswordSender = \"{$slconf['PasswordSender']}\";
## For a detailed description of the following switches see
-## http://meta.wikimedia.org/Enotif and http://meta.wikimedia.org/Eauthent
+## http://www.mediawiki.org/wiki/Extension:Email_notification
+## and http://www.mediawiki.org/wiki/Extension:Email_notification
## There are many more options for fine tuning available see
## /includes/DefaultSettings.php
## UPO means: this is also a user preference option
@@ -1467,19 +1607,21 @@ if ( \$wgCommandLineMode ) {
\$wgDBname = \"{$slconf['DBname']}\";
\$wgDBuser = \"{$slconf['DBuser']}\";
\$wgDBpassword = \"{$slconf['DBpassword']}\";
-\$wgDBport = \"{$slconf['DBport']}\";
+
+# MySQL specific settings
\$wgDBprefix = \"{$slconf['DBprefix']}\";
# MySQL table options to use during installation or update
\$wgDBTableOptions = \"{$slconf['DBTableOptions']}\";
-# Schemas for Postgres
-\$wgDBmwschema = \"{$slconf['DBmwschema']}\";
-\$wgDBts2schema = \"{$slconf['DBts2schema']}\";
-
# Experimental charset support for MySQL 4.1/5.0.
\$wgDBmysql5 = {$conf->DBmysql5};
+# Postgres specific settings
+\$wgDBport = \"{$slconf['DBport']}\";
+\$wgDBmwschema = \"{$slconf['DBmwschema']}\";
+\$wgDBts2schema = \"{$slconf['DBts2schema']}\";
+
## Shared memory settings
\$wgMainCacheType = $cacheType;
\$wgMemCachedServers = $mcservers;
@@ -1610,9 +1752,9 @@ function aField( &$conf, $field, $text, $type = "text", $value = "", $onclick =
}
function getLanguageList() {
- global $wgLanguageNames;
+ global $wgLanguageNames, $IP;
if( !isset( $wgLanguageNames ) ) {
- require_once( "languages/Names.php" );
+ require_once( "$IP/languages/Names.php" );
}
$codes = array();
@@ -1722,8 +1864,7 @@ function database_switcher($db) {
global $ourdb;
$color = $ourdb[$db]['bgcolor'];
$full = $ourdb[$db]['fullname'];
- print "<div id='$db' style='display:none; background: $color'>\n";
- print "<h3>$full specific options:</h3>\n";
+ print "<fieldset id='$db'><legend>$full specific options</legend>\n";
}
function printListItem( $item ) {