Fix CLI installer when --dbname is not specified on command line.
authorC. Scott Ananian <cscott@cscott.net>
Wed, 28 Oct 2015 02:01:54 +0000 (22:01 -0400)
committerC. Scott Ananian <cscott@cscott.net>
Wed, 28 Oct 2015 02:01:54 +0000 (22:01 -0400)
When installing without an explicit `--dbname` argument on the command
line, the database is installed with the default value of $wgDBname
from DefaultSettings.php (which is `my_wiki`), but then the
LocalSettings.php file is written with the line:
    $wgDBname = "";
which overrides the default value and makes the wiki unable to
connect to the database created by the installer.

Adding `wgDBname` to the `$defaultVarNames` list fixes this problem.

Change-Id: I3792be9675aabe00b5497ed4203b12b89da8dc3a

includes/installer/Installer.php

index ba0e38f..dd12cea 100644 (file)
@@ -169,6 +169,7 @@ abstract class Installer {
                'wgEnotifUserTalk',
                'wgEnotifWatchlist',
                'wgEmailAuthentication',
+               'wgDBname',
                'wgDBtype',
                'wgDiff3',
                'wgImageMagickConvertCommand',