new-installer: A better implementation of the database user creation added in r69008
authorÆvar Arnfjörð Bjarmason <avar@users.mediawiki.org>
Sun, 4 Jul 2010 21:25:16 +0000 (21:25 +0000)
committerÆvar Arnfjörð Bjarmason <avar@users.mediawiki.org>
Sun, 4 Jul 2010 21:25:16 +0000 (21:25 +0000)
commit0307faa10d4f9dd0d13e6e8412fb9028c047087f
tree00d0715ead242d71b6cf77d32896b4e4ac1d2689
parentf64cbf506c17ed7ed8ce4b3db997f1f9ead9b8ce
new-installer: A better implementation of the database user creation added in r69008

Since MysqlInstaller isn't in the same class hierarchy as WebInstaller
the database user functions I added in r69008 messed up the namespace
for non-MySQL, and added redundant user creation messages to
e.g. SQLite, which doesn't even have users.

Instead support either a plain string in $installSteps, or an array
that has callback data that'll be called with call_user_func_array.

The implementation is a bit ad-hoc, we should probably move the magic
in Hooks.php's wfRunHooks to some general library function so we can
use that here, or perhaps just implement these installSteps with
something like:

    $wgHook['Installer::steps'][] = array(...)

And then use wfRunHooks to run all the steps. But in the meantime
this'll do.

This breaks the nascent CliInstaller (indicating that we should do
these calls better), and I haven't added the equivalent functionality
to $envChecks.
includes/installer/Installer.php
includes/installer/InstallerDBType.php
includes/installer/MysqlInstaller.php
includes/installer/WebInstaller.php