function installationOperation(&$step) { global $errors; $language = isset($_POST['language']) ? $_POST['language'] : $GLOBALS['language']; switch ($step) { case 1: $errors = Install::check(); break; case 2: $errors = Install::check(); Install::installUrl(USVN_CONFIG_FILE, USVN_HTACCESS_FILE, $_SERVER['REQUEST_URI'], $_SERVER['HTTP_HOST'], isset($_SERVER['HTTPS'])); break; case 3: Install::installLanguage(USVN_CONFIG_FILE, $language); Install::installTimezone(USVN_CONFIG_FILE, $_POST['timezone']); Install::installLocale(USVN_CONFIG_FILE); $GLOBALS['language'] = $_POST['language']; USVN_Translation::initTranslation($GLOBALS['language'], USVN_LOCALE_DIRECTORY); break; case 4: if ($_POST['agreement'] != 'ok') { throw new USVN_Exception(T_('You need to accept the licence to continue installation.')); } break; case 5: Install::installConfiguration(USVN_CONFIG_FILE, $_POST['title']); $import = Install::installSubversion(USVN_CONFIG_FILE, $_POST['pathSubversion'], $_POST['passwdFile'], $_POST['authzFile'], $_POST['urlSubversion'], $_FILES['configFile']); if ($import === true) { displayWarning(T_("A copy of the old SVN repository has been made, any modification done on the old one won't interact on the new one. You should disable the old repository access.")); $step = 7; } break; case 6: if (isset($_POST['createdb'])) { $createdb = true; } else { $createdb = false; } Install::installDb(USVN_CONFIG_FILE, USVN_APP_DIR . '/install/sql/', $_POST['host'], $_POST['user'], $_POST['password'], $_POST['database'], $_POST['prefix'], $_POST['adapter'], $createdb); break; case 7: Install::installAdmin(USVN_CONFIG_FILE, $_POST['login'], $_POST['password'], $_POST['firstname'], $_POST['lastname'], $_POST['email']); break; case 8: Install::installCheckForUpdate(USVN_CONFIG_FILE, $_POST['update']); Install::installEnd(USVN_CONFIG_FILE); $GLOBALS['apacheConfig'] = Install::getApacheConfig(USVN_CONFIG_FILE); break; } }
*/ echo 'Configuring URL... '; Install::installUrl(USVN_CONFIG_FILE, $options['htaccess-file'], $options['usvn-url-path'], $options['server-host'], $options['server-useHTTPS']); echo 'Done!' . "\n"; echo 'Configuring language... '; Install::installLanguage(USVN_CONFIG_FILE, $config->translation->locale); Install::installTimezone(USVN_CONFIG_FILE, $config->timezone); Install::installLocale(USVN_CONFIG_FILE); echo 'Done!' . "\n"; echo 'Configuring site settings... '; Install::installConfiguration(USVN_CONFIG_FILE, $config->site->title); echo 'Done!' . "\n"; echo 'Configuring subversion... '; Install::installSubversion(USVN_CONFIG_FILE, $config->subversion->path, $config->subversion->passwd, $config->subversion->authz, $config->subversion->url); echo 'Done!' . "\n"; echo 'Configuring database... '; Install::installDb(USVN_CONFIG_FILE, $options['database-path'], $config->database->options->host, $config->database->options->username, $config->database->options->password, $config->database->options->dbname, $config->database->prefix, $config->database->adapterName, true); echo 'Done!' . "\n"; echo 'Configuring admin account... '; Install::installAdmin(USVN_CONFIG_FILE, $options['admin-login'], $options['admin-password'], $options['admin-firstname'], $options['admin-lastname'], $options['admin-email']); echo 'Done!' . "\n"; Install::installEnd(USVN_CONFIG_FILE); echo "\n" . 'Installation is finished!' . "\n"; if ($options['output-apache-config']) { echo 'Here is the Apache configuration. (You might need to restart your server)' . "\n\n"; echo Install::getApacheConfig(USVN_CONFIG_FILE); } } catch (USVN_Exception $e) { echo $e->getMessage(); exit(1); }