echo "<p>If you cannot resolve the issue, you can save the configuration file manually. The contents of the textarea should be saved to \n\t\t\t\t<code>./include/local.config.php</code>. Once this is done click <strong>Retry</strong>."; echo "<form>"; echo "<textarea rows=\"12\" cols=\"100\">" . htmlspecialchars($config_file_contents) . "</textarea>"; echo "</form>"; } } echo _theme_footer(); } else { // if the s_opendb_release table does not exist, we need to install it, and populate with // a specific version record. echo _theme_header("OpenDb " . get_opendb_version() . " Installation", FALSE); echo "<h2>Pre Installation</h2>"; $preinstall_details = NULL; $db_version = NULL; if (!check_opendb_table('s_opendb_release') || count_opendb_table_rows('s_opendb_release') == 0 || count_opendb_table_columns('s_opendb_release') != 6) { if (!check_opendb_table('s_opendb_release') || count_opendb_table_columns('s_opendb_release') != 6) { if (exec_install_sql_file('./install/new/s_opendb_release.sql', $errors)) { $preinstall_details[] = 'OpenDb release table created'; } } if (is_opendb_partially_installed()) { $db_version = install_determine_opendb_database_version(); if ($db_version !== FALSE) { // we are inserting a placeholder record for whatever the users current version is, so we can proceed with // any upgrades. Its NULL already, because there are no steps for the old install, but the nominated_version // information will be used by installer for any additional upgrades. if (insert_opendb_release($db_version, 'New Install', NULL) !== FALSE) { $preinstall_details[] = 'Inserted OpenDb release record (Version ' . $db_version . ')'; } else { $errors[] = 'Failed to insert OpenDb release record (Version ' . $db_version . ')'; }
function is_valid_opendb_release_table() { return check_opendb_table('s_opendb_release') && count_opendb_table_columns('s_opendb_release') == 6; }