diff options
author | Oleg Pudeyev <oleg@bsdpower.com> | 2012-12-22 18:01:53 -0500 |
---|---|---|
committer | Oleg Pudeyev <oleg@bsdpower.com> | 2012-12-22 18:01:53 -0500 |
commit | 86f0c0a6d5d65141fbce138fc7702795b39693cd (patch) | |
tree | 5ab3d66bb0b3e55009cd013f8bd63edbf8d8825e /phpBB | |
parent | e53f4e5eac003a25841acd09dec9e8cc94b9951a (diff) | |
parent | 68ffb106fb2f9b246f52cf94f09c187531059f3e (diff) | |
download | forums-86f0c0a6d5d65141fbce138fc7702795b39693cd.tar forums-86f0c0a6d5d65141fbce138fc7702795b39693cd.tar.gz forums-86f0c0a6d5d65141fbce138fc7702795b39693cd.tar.bz2 forums-86f0c0a6d5d65141fbce138fc7702795b39693cd.tar.xz forums-86f0c0a6d5d65141fbce138fc7702795b39693cd.zip |
Merge PR #1152 branch 'nickvergessen/ticket/11278' into develop-olympus
* nickvergessen/ticket/11278:
[ticket/11278] Comment out the code for dropping the Q&A tables
[ticket/11278] Fix not running queries from db tools in database update
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/install/database_update.php | 47 |
1 files changed, 30 insertions, 17 deletions
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index 983b1b46c4..8aa62af7e1 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -1017,7 +1017,7 @@ function database_update_info() *****************************************************************************/ function change_database_data(&$no_updates, $version) { - global $db, $errored, $error_ary, $config, $phpbb_root_path, $phpEx; + global $db, $db_tools, $errored, $error_ary, $config, $table_prefix, $phpbb_root_path, $phpEx; switch ($version) { @@ -1332,8 +1332,6 @@ function change_database_data(&$no_updates, $version) ), ); - global $db_tools; - $statements = $db_tools->perform_schema_changes($changes); foreach ($statements as $sql) @@ -1975,26 +1973,41 @@ function change_database_data(&$no_updates, $version) } $db->sql_freeresult($result); - global $db_tools, $table_prefix; - - // Recover from potentially broken Q&A CAPTCHA table on firebird - // Q&A CAPTCHA was uninstallable, so it's safe to remove these - // without data loss + /* + * Due to a bug, vanilla phpbb could not create captcha tables + * in 3.0.8 on firebird. It was possible for board administrators + * to adjust the code to work. If code was manually adjusted by + * board administrators, index names would not be the same as + * what 3.0.9 and newer expect. This code fragment drops captcha + * tables, destroying all entered Q&A captcha configuration, such + * that when Q&A is configured next the respective tables will be + * created with correct index names. + * + * If you wish to preserve your Q&A captcha configuration, you can + * manually rename indexes to the currently expected name: + * phpbb_captcha_questions_lang_iso => phpbb_captcha_questions_lang + * phpbb_captcha_answers_question_id => phpbb_captcha_answers_qid + * + * Again, this needs to be done only if a board was manually modified + * to fix broken captcha code. + * if ($db_tools->sql_layer == 'firebird') { - $tables = array( - $table_prefix . 'captcha_questions', - $table_prefix . 'captcha_answers', - $table_prefix . 'qa_confirm', + $changes = array( + 'drop_tables' => array( + $table_prefix . 'captcha_questions', + $table_prefix . 'captcha_answers', + $table_prefix . 'qa_confirm', + ), ); - foreach ($tables as $table) + $statements = $db_tools->perform_schema_changes($changes); + + foreach ($statements as $sql) { - if ($db_tools->sql_table_exists($table)) - { - $db_tools->sql_table_drop($table); - } + _sql($sql, $errored, $error_ary); } } + */ $no_updates = false; break; |