Skip to content

Commit

Permalink
Allow automated mysql installation via config.php.
Browse files Browse the repository at this point in the history
  • Loading branch information
ringmaster committed Dec 7, 2011
1 parent d5207bb commit e8c19f8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions handlers/installhandler.php
Expand Up @@ -133,14 +133,13 @@ public function act_begin_install()
}

$db_type = $this->handler_vars['db_type'];
if ( $db_type == 'mysql' || $db_type == 'pgsql' ) {
if ( (!Config::exists('db_connection') || Config::get( 'db_connection' )->connection_string == '') && ($db_type == 'mysql' || $db_type == 'pgsql') ) {
$this->handler_vars['db_host'] = $_POST["{$db_type}_db_host"];
$this->handler_vars['db_user'] = $_POST["{$db_type}_db_user"];
$this->handler_vars['db_pass'] = $_POST["{$db_type}_db_pass"];
$this->handler_vars['db_schema'] = $_POST["{$db_type}_db_schema"];
}


// we got here, so we have all the info we need to install

// make sure the admin password is correct
Expand Down

0 comments on commit e8c19f8

Please sign in to comment.