$ourdb['postgres']['bgcolor'] = '#aaccff';
$ourdb['postgres']['rootuser'] = 'postgres';
+$ourdb['sqlite']['fullname'] = 'SQLite';
+$ourdb['sqlite']['havedriver'] = 0;
+$ourdb['sqlite']['compile'] = 'pdo_sqlite';
+$ourdb['sqlite']['bgcolor'] = '#b1ebb1';
+$ourdb['sqlite']['rootuser'] = 'root';
+
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
if( !$ok ) { continue; }
- } else /* not mysql */ {
+ } else { # not mysql
error_reporting( E_ALL );
$wgSuperUser = '';
## Possible connect as a superuser
- if( $useRoot ) {
+ if( $useRoot && $conf->DBtype != 'sqlite' ) {
$wgDBsuperuser = $conf->RootUser;
echo( "<li>Attempting to connect to database \"postgres\" as superuser \"$wgDBsuperuser\"..." );
$wgDatabase = $dbc->newFromParams($wgDBserver, $wgDBsuperuser, $conf->RootPW, "postgres", 1);
} else {
$myver = $wgDatabase->getServerVersion();
}
- $wgDatabase->initial_setup('', $wgDBname);
- }
+ if (is_callable(array($wgDatabase, 'initial_setup'))) $wgDatabase->initial_setup('', $wgDBname);
+ }
if ( !$wgDatabase->isOpen() ) {
$errs["DBserver"] = "Couldn't connect to database";
if ($conf->DBtype == 'mysql') {
dbsource( "../maintenance/tables.sql", $wgDatabase );
dbsource( "../maintenance/interwiki.sql", $wgDatabase );
- } else if ($conf->DBtype == 'postgres') {
+ } elseif (is_callable(array($wgDatabase, 'setup_database'))) {
$wgDatabase->setup_database();
}
else {
*/
class MySQLField {
private $name, $tablename, $default, $max_length, $nullable,
- $is_pk, $is_unique, $is_key, $type;
+ $is_pk, $is_unique, $is_multiple, $is_key, $type;
function __construct ($info) {
$this->name = $info->name;
$this->tablename = $info->table;