Make sure that SQLite uses no prefix
authorMax Semenik <maxsem.wiki@gmail.com>
Sat, 10 Nov 2012 09:54:10 +0000 (15:24 +0530)
committerMax Semenik <maxsem.wiki@gmail.com>
Sat, 10 Nov 2012 09:54:10 +0000 (15:24 +0530)
Otherwise, when user selects MySQL, sets the prefix,
then switches  to SQLite, the tables will created with  prefix
however the prefix will be absent from LocalSettings, making the
wiki dead on arrival.

Change-Id: I6360af819f87b03c2e9967207c43bca95f931a00

includes/installer/SqliteInstaller.php

index 6e1a74f..d8fa724 100644 (file)
@@ -113,6 +113,8 @@ class SqliteInstaller extends DatabaseInstaller {
                        $dir = self::realpath( $dir );
                        $this->setVar( 'wgSQLiteDataDir', $dir );
                }
+               # Table prefix is not used on SQLite, keep it empty
+               $this->setVar( 'wgDBprefix', '' );
                return $result;
        }