mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-29 14:48:53 +00:00
Merge PR #1152 branch 'develop-olympus' into develop
* develop-olympus: [ticket/11278] Comment out the code for dropping the Q&A tables [ticket/11278] Fix not running queries from db tools in database update Conflicts: phpBB/install/database_update.php
This commit is contained in:
commit
4f477791ec
1 changed files with 30 additions and 17 deletions
|
@ -1210,7 +1210,7 @@ function database_update_info()
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
function change_database_data(&$no_updates, $version)
|
function change_database_data(&$no_updates, $version)
|
||||||
{
|
{
|
||||||
global $db, $errored, $error_ary, $config, $phpbb_root_path, $phpEx, $db_tools;
|
global $db, $db_tools, $errored, $error_ary, $config, $table_prefix, $phpbb_root_path, $phpEx;
|
||||||
|
|
||||||
$update_helpers = new phpbb_update_helpers();
|
$update_helpers = new phpbb_update_helpers();
|
||||||
|
|
||||||
|
@ -1527,8 +1527,6 @@ function change_database_data(&$no_updates, $version)
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
global $db_tools;
|
|
||||||
|
|
||||||
$statements = $db_tools->perform_schema_changes($changes);
|
$statements = $db_tools->perform_schema_changes($changes);
|
||||||
|
|
||||||
foreach ($statements as $sql)
|
foreach ($statements as $sql)
|
||||||
|
@ -2170,26 +2168,41 @@ function change_database_data(&$no_updates, $version)
|
||||||
}
|
}
|
||||||
$db->sql_freeresult($result);
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
global $db_tools, $table_prefix;
|
/*
|
||||||
|
* Due to a bug, vanilla phpbb could not create captcha tables
|
||||||
// Recover from potentially broken Q&A CAPTCHA table on firebird
|
* in 3.0.8 on firebird. It was possible for board administrators
|
||||||
// Q&A CAPTCHA was uninstallable, so it's safe to remove these
|
* to adjust the code to work. If code was manually adjusted by
|
||||||
// without data loss
|
* 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')
|
if ($db_tools->sql_layer == 'firebird')
|
||||||
{
|
{
|
||||||
$tables = array(
|
$changes = array(
|
||||||
$table_prefix . 'captcha_questions',
|
'drop_tables' => array(
|
||||||
$table_prefix . 'captcha_answers',
|
$table_prefix . 'captcha_questions',
|
||||||
$table_prefix . 'qa_confirm',
|
$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))
|
_sql($sql, $errored, $error_ary);
|
||||||
{
|
|
||||||
$db_tools->sql_table_drop($table);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
$no_updates = false;
|
$no_updates = false;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Reference in a new issue