} } $result = resultPolish($result); session_write_close(); if (installerStep() === STEP_PHP_REQUIREMENTS) { require "tpl/requirements.tpl.php"; } else { if (installerStep() === STEP_DB_CONFIG) { require "tpl/db_configuration.tpl.php"; } else { if (installerStep() === STEP_DB_REQUIREMENTS) { require "tpl/db_requirements.tpl.php"; } else { if (installerStep() === STEP_CONFIG) { require "tpl/configuration.tpl.php"; } else { if (installerStep() === STEP_PERMISSION) { require "tpl/permission.tpl.php"; } else { if (installerStep() === STEP_WRITE) { require "tpl/write.tpl.php"; } else { if (installerStep() === STEP_DONE) { require "tpl/done.tpl.php"; } } } } } } }
function installerInit() { sessionInit(); //handle streamed content first if (isset($_SERVER['PATH_INFO'])) { $path_bits = preg_split('/\\//', $_SERVER['PATH_INFO']); $path_bits = cleanPath($path_bits); if (count($path_bits) == 3) { if ($path_bits[0] == "stream") { streamContent($path_bits[2], $path_bits[1]); } } else { redirectSelf(); } } $result = array(); if (installerStep() !== STEP_DONE && getLock()) { installerStepSet(STEP_DONE); redirectSelf(); } $is_redirect = FALSE; if (isset($_GET['restart'])) { session_destroy(); redirectSelf(); } if (isset($_GET['next'])) { transitionNextStep(); } if (isset($_GET['prev'])) { installerStepSet(prevStep(installerStep())); } if (dbEnabled()) { $result['with_db'] = TRUE; } else { $result['with_db'] = FALSE; } $result['step'] = installerStep(); return $result; }