automated installation

This commit is contained in:
Shish 2009-01-22 05:02:22 -08:00
parent fb7e14ad21
commit 46c3989ce5

View File

@ -81,11 +81,14 @@ function check_im_version() {
}
// }}}
function do_install() { // {{{
if(!isset($_POST['database_dsn'])) {
begin();
if(isset($_POST['database_dsn'])) {
install_process($_POST['database_dsn']);
}
else if(file_exists("auto_install.conf")) {
install_process(trim(file_get_contents("auto_install.conf")));
}
else {
install_process();
begin();
}
} // }}}
function begin() { // {{{
@ -126,8 +129,7 @@ function begin() { // {{{
</div>
EOD;
} // }}}
function install_process() { // {{{
$database_dsn = $_POST['database_dsn'];
function install_process($database_dsn) { // {{{
create_tables($database_dsn);
insert_defaults($database_dsn);
build_dirs();