\n";
+
+
+ if ($conf->DBtype == 'ibm_db2') {
+ // Now that table creation is done, make sure everything is committed
+ // Do this before doing inserts through API
+ if ($wgDatabase->lastError()) {
+ print "
Errors encountered during table creation -- rolled back
\n";
$wgDatabase->insert( 'site_stats',
@@ -1221,7 +1258,7 @@ if( $conf->posted && ( 0 == count( $errs ) ) ) {
} else {
# Yes, so run the grants
echo( "
" . htmlspecialchars( "Granting user permissions to $wgDBuser on $wgDBname..." ) );
- dbsource( "../maintenance/users.sql", $wgDatabase );
+ $wgDatabase->sourceFile( "../maintenance/users.sql" );
echo( "success.
\n" );
}
}
@@ -1261,8 +1298,6 @@ if( $conf->posted && ( 0 == count( $errs ) ) ) {
$revid = $revision->insertOn( $wgDatabase );
$article->updateRevisionOn( $wgDatabase, $revision );
}
- // Now that all database work is done, make sure everything is committed
- $wgDatabase->commit();
/* Write out the config file now that all is well */
print "
\n";
@@ -1343,7 +1378,7 @@ if( count( $errs ) ) {
-
+
Superuser account:
checked="checked" />
+ populateadmin ) { ?>checked="checked" />
+
@@ -1792,6 +1829,11 @@ function writeLocalSettings( $conf ) {
# Needs literal string interpolation for the current style path
$slconf['RightsIcon'] = $conf->RightsIcon;
}
+
+ if( $conf->populateadmin ) {
+ $slconf['DBadminuser'] = $conf->RootUser;
+ $slconf['DBadminpassword'] = $conf->RootPW;
+ }
if( $conf->DBtype == 'mysql' ) {
$dbsettings =
@@ -1858,9 +1900,6 @@ set_include_path( implode( PATH_SEPARATOR, \$path ) . PATH_SEPARATOR . get_inclu
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' );" . "
-
if ( \$wgCommandLineMode ) {
if ( isset( \$_SERVER ) && array_key_exists( 'REQUEST_METHOD', \$_SERVER ) ) {
die( \"This script must be run from the command line\\n\" );
@@ -1899,6 +1938,10 @@ if ( \$wgCommandLineMode ) {
{$dbsettings}
+## Database admin settings, used for maintenance scripts
+\$wgDBadminuser = \"". ($conf->populateadmin ? $slconf['DBadminuser'] : '' )."\";
+\$wgDBadminpassword = \"". ($conf->populateadmin ? $slconf['DBadminpassword'] : '' )."\";
+
## Shared memory settings
\$wgMainCacheType = $cacheType;
\$wgMemCachedServers = $mcservers;
@@ -1924,6 +1967,11 @@ if ( \$wgCommandLineMode ) {
## you can enable inline LaTeX equations:
\$wgUseTeX = false;
+## Set \$wgCacheDirectory to a writable directory on the web server
+## to make your wiki go slightly faster. The directory should not
+## be publically accessible from the web.
+#\$wgCacheDirectory = \"\$IP/cache\";
+
\$wgLocalInterwiki = strtolower( \$wgSitename );
\$wgLanguageCode = \"{$slconf['LanguageCode']}\";
@@ -1946,6 +1994,8 @@ if ( \$wgCommandLineMode ) {
\$wgDiff3 = \"{$slconf['diff3']}\";
+\$wgPhpCliPath = \"{$slconf['phpCliPath']}\";
+
# When you make changes to this configuration file, this will make
# sure that cached pages are cleared.
\$wgCacheEpoch = max( \$wgCacheEpoch, gmdate( 'YmdHis', @filemtime( __FILE__ ) ) );
@@ -2055,7 +2105,7 @@ function getLanguageList() {
if( preg_match( '/Messages([A-Z][a-z_]+)\.php$/', $f, $m ) ) {
$code = str_replace( '_', '-', strtolower( $m[1] ) );
if( isset( $wgLanguageNames[$code] ) ) {
- $name = $code . ' - ' . $wgLanguageNames[$code];
+ $name = wfBCP47( $code ) . ' - ' . $wgLanguageNames[$code];
} else {
$name = $code;
}