$conf->DBport = importPost( "DBport", "5432" );
$conf->DBmwschema = importPost( "DBmwschema", "mediawiki" );
$conf->DBts2schema = importPost( "DBts2schema", "public" );
+
+ ## SQLite specific
+ $conf->SQLiteDataDir = importPost( "SQLiteDataDir", "" );
/* Check for validity */
$errs = array();
cause things to break. <b>If upgrading an older installation, leave
in backwards-compatible mode.</b>
</p>
- </div>
+ </fieldset>
<?php database_switcher('postgres'); ?>
<div class="config-input"><?php
</div>
</fieldset>
+ <?php database_switcher('sqlite'); ?>
+ <div class="config-input"><?php
+ aField( $conf, "SQLiteDataDir", "SQLite data directory:" );
+ ?></div>
+ <div class="config-desc">
+ <p>SQLite stores table data into files in the filesystem.
+ If you do not provide an explicit path, a "data" directory in
+ the parent of your document root will be used.</p>
+
+ <p>This directory must exist and be writable by the web server.</p>
+ </div>
+ </fieldset>
+
<div class="config-input" style="padding:2em 0 3em">
<label class='column'> </label>
<input type="submit" value="Install MediaWiki!" class="btn-install" />
$slconf['RightsIcon'] = $conf->RightsIcon;
}
+ if( $conf->DBtype == 'mysql' ) {
+ $dbsettings =
+"# MySQL specific settings
+\$wgDBprefix = \"{$slconf['DBprefix']}\";
+
+# MySQL table options to use during installation or update
+\$wgDBTableOptions = \"{$slconf['DBTableOptions']}\";
+
+# Experimental charset support for MySQL 4.1/5.0.
+\$wgDBmysql5 = {$conf->DBmysql5};";
+ } elseif( $conf->DBtype == 'postgres' ) {
+ $dbsettings =
+"# Postgres specific settings
+\$wgDBport = \"{$slconf['DBport']}\";
+\$wgDBmwschema = \"{$slconf['DBmwschema']}\";
+\$wgDBts2schema = \"{$slconf['DBts2schema']}\";";
+ } elseif( $conf->DBtype == 'sqlite' ) {
+ $dbsettings =
+"# SQLite-specific settings
+\$wgSQLiteDataDir = \"{$slconf['SQLiteDataDir']}\";";
+ } else {
+ // ummm... :D
+ $dbsettings = '';
+ }
+
+
$localsettings = "
# This file was automatically generated by the MediaWiki installer.
# If you make manual changes, please keep track in case you need to
\$wgDBuser = \"{$slconf['DBuser']}\";
\$wgDBpassword = \"{$slconf['DBpassword']}\";
-# MySQL specific settings
-\$wgDBprefix = \"{$slconf['DBprefix']}\";
-
-# MySQL table options to use during installation or update
-\$wgDBTableOptions = \"{$slconf['DBTableOptions']}\";
-
-# Experimental charset support for MySQL 4.1/5.0.
-\$wgDBmysql5 = {$conf->DBmysql5};
-
-# Postgres specific settings
-\$wgDBport = \"{$slconf['DBport']}\";
-\$wgDBmwschema = \"{$slconf['DBmwschema']}\";
-\$wgDBts2schema = \"{$slconf['DBts2schema']}\";
+{$dbsettings}
## Shared memory settings
\$wgMainCacheType = $cacheType;