From bf8ac19eaa8d74f9dfd6d597190f5664e7339382 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Sun, 4 Oct 2009 18:13:59 +0000 Subject: Move trunk/phpBB to old_trunk/phpBB git-svn-id: file:///svn/phpbb/trunk@10210 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/install/database_update.php | 410 -------------------------------------- 1 file changed, 410 deletions(-) delete mode 100644 phpBB/install/database_update.php (limited to 'phpBB/install/database_update.php') diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php deleted file mode 100644 index 0be2e0f5b8..0000000000 --- a/phpBB/install/database_update.php +++ /dev/null @@ -1,410 +0,0 @@ -session_begin(); -phpbb::$acl->init(phpbb::$user->data); -phpbb::$user->setup('install'); - -if (!phpbb::$user->is_registered) -{ - login_box(); -} - -if (!phpbb::$acl->acl_get('a_board')) -{ - trigger_error('NO_AUTH'); -} - -include PHPBB_ROOT_PATH . 'includes/db/db_tools.' . PHP_EXT; - -$db_tools = new phpbb_db_tools(phpbb::$db, true); - -// Define some variables for the database update -$inline_update = (request_var('type', 0)) ? true : false; - -// Only an example, but also commented out -$database_update_info = array( - - // Changes from 3.0.5 to 3.1.0-dev1 - '3.0.5' => array(), -); - -$error_ary = array(); -$errored = false; - -header('Content-type: text/html; charset=UTF-8'); - -?> - - - - - - - - - -<?php echo phpbb::$user->lang['UPDATING_TO_LATEST_STABLE']; ?> - - - - - - -
- - -
-
-
- -
-
- -

lang['UPDATING_TO_LATEST_STABLE']; ?>

- -
- -

lang['DATABASE_TYPE']; ?> :: sql_layer; ?>
-destroy('#config'); -$config = phpbb_cache::obtain_config(); - -echo phpbb::$user->lang['PREVIOUS_VERSION'] . ' :: ' . phpbb::$config['version'] . '
'; -echo phpbb::$user->lang['UPDATED_VERSION'] . ' :: ' . $updates_to_version . '

'; - -$current_version = str_replace('rc', 'RC', strtolower(phpbb::$config['version'])); -$latest_version = str_replace('rc', 'RC', strtolower($updates_to_version)); -$orig_version = phpbb::$config['version']; - -// Fill DB version -if (empty(phpbb::$config['dbms_version'])) -{ - set_config('dbms_version', phpbb::$db->sql_server_info(true)); -} - -// If the latest version and the current version are 'unequal', we will update the version_update_from, else we do not update anything. -if ($inline_update) -{ - if ($current_version !== $latest_version) - { - set_config('version_update_from', $orig_version); - } -} -else -{ - // If not called from the update script, we will actually remove the traces - phpbb::$db->sql_query('DELETE FROM ' . CONFIG_TABLE . " WHERE config_name = 'version_update_from'"); -} - -// Schema updates -?> -

- -

lang['UPDATE_DATABASE_SCHEMA']; ?>

- -
-

lang['PROGRESS']; ?> :: - -= as the version to be updated to next, we will skip the process - if (version_compare($version, $current_version, '<') && version_compare($current_version, $next_version, '>=')) - { - continue; - } - - if (!sizeof($schema_changes)) - { - continue; - } - - // Get statements for schema updates - $statements = $db_tools->sql_schema_changes($schema_changes); - - if (sizeof($statements)) - { - $no_updates = false; - - foreach ($statements as $sql) - { - _sql($sql, $errored, $error_ary); - } - } -} - -_write_result($no_updates, $errored, $error_ary); - -// Data updates -$error_ary = array(); -$errored = $no_updates = false; - -?> - -

-

lang['UPDATING_DATA']; ?>

-
-

lang['PROGRESS']; ?> :: - -= as the version to be updated to next, we will skip the process - if (version_compare($version, $current_version, '<') && version_compare($current_version, $next_version, '>=')) - { - continue; - } - - change_database_data($no_updates, $version); -} - -_write_result($no_updates, $errored, $error_ary); - -$error_ary = array(); -$errored = $no_updates = false; - -?> - -

-

lang['UPDATE_VERSION_OPTIMIZE']; ?>

-
-

lang['PROGRESS']; ?> :: - -dbms_type) -{ - case 'mysql': - $sql = 'OPTIMIZE TABLE ' . $table_prefix . 'auth_access, ' . $table_prefix . 'banlist, ' . $table_prefix . 'categories, ' . $table_prefix . 'config, ' . $table_prefix . 'disallow, ' . $table_prefix . 'forum_prune, ' . $table_prefix . 'forums, ' . $table_prefix . 'groups, ' . $table_prefix . 'posts, ' . $table_prefix . 'posts_text, ' . $table_prefix . 'privmsgs, ' . $table_prefix . 'privmsgs_text, ' . $table_prefix . 'ranks, ' . $table_prefix . 'search_results, ' . $table_prefix . 'search_wordlist, ' . $table_prefix . 'search_wordmatch, ' . $table_prefix . 'sessions_keys' . $table_prefix . 'smilies, ' . $table_prefix . 'themes, ' . $table_prefix . 'themes_name, ' . $table_prefix . 'topics, ' . $table_prefix . 'topics_watch, ' . $table_prefix . 'user_group, ' . $table_prefix . 'users, ' . $table_prefix . 'vote_desc, ' . $table_prefix . 'vote_results, ' . $table_prefix . 'vote_voters, ' . $table_prefix . 'words'; - _sql($sql, $errored, $error_ary); - break; - - case 'postgresql': - _sql("VACUUM ANALYZE", $errored, $error_ary); - break; -} -*/ - -_write_result($no_updates, $errored, $error_ary); - -?> - -
-

lang['UPDATE_COMPLETED']; ?>

- -
- -purge(); -?> - -

lang['UPDATE_FILES_NOTICE']; ?>

- -

lang['COMPLETE_LOGIN_TO_BOARD']; ?>

- - - -

lang['INLINE_UPDATE_SUCCESSFUL'])) ? phpbb::$user->lang['INLINE_UPDATE_SUCCESSFUL'] : 'The database update was successful. Now you need to continue the update process.'); ?>

- -

" class="button1">lang['CONTINUE_UPDATE_NOW'])) ? phpbb::$user->lang['CONTINUE_UPDATE_NOW'] : 'Continue the update process now'; ?>

- -purge(); - -?> - -
-
- -
-
-
- - -
- - - - -\n{$sql}\n
"; - } - - phpbb::$db->sql_return_on_error(true); - - $result = phpbb::$db->sql_query($sql); - if (phpbb::$db->sql_error_triggered) - { - $errored = true; - $error_ary['sql'][] = phpbb::$db->sql_error_sql; - $error_ary['error_code'][] = phpbb::$db->_sql_error(); - } - - phpbb::$db->sql_return_on_error(false); - - if ($echo_dot) - { - echo ". \n"; - flush(); - } - - return $result; -} - -function _write_result($no_updates, $errored, $error_ary) -{ - if ($no_updates) - { - echo ' ' . phpbb::$user->lang['NO_UPDATES_REQUIRED'] . '

'; - } - else - { - echo ' ' . phpbb::$user->lang['DONE'] . '

' . phpbb::$user->lang['RESULT'] . ' :: '; - - if ($errored) - { - echo ' ' . phpbb::$user->lang['SOME_QUERIES_FAILED'] . '

' . phpbb::$user->lang['SQL_FAILURE_EXPLAIN'] . '

'; - } - else - { - echo '' . phpbb::$user->lang['NO_ERRORS'] . '

'; - } - } -} - -?> \ No newline at end of file -- cgit v1.2.1