Commit 03a66434 authored by Penny Leach's avatar Penny Leach
Browse files

fixing up the mysql fix that broke the installer on postgres

Conflicts:

	htdocs/lib/upgrade.php
parent 8ee29cca
......@@ -550,13 +550,16 @@ function core_install_lastcoredata_defaults() {
$user->email = 'root@example.org';
$user->quota = get_config_plugin('artefact', 'file', 'defaultquota');
$user->authinstance = $auth_instance->id;
$newid = insert_record('usr', $user, 'id', true);
$dbtype = get_config('dbtype');
if ($newid > 0 && ($dbtype == 'mysql' || $dbtype == 'mysql5')) { // gratuitous mysql workaround
if (is_mysql()) { // gratuitous mysql workaround
$newid = insert_record('usr', $user, 'id', true);
set_field('usr', 'id', 0, 'id', $newid);
}
else {
insert_record('usr', $user);
}
// Insert the admin user
$user = new StdClass;
$user->username = 'admin';
$user->password = 'mahara';
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment