mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 22:10:45 +02:00
[ticket/9892] Drop Q&A CAPTCHA tables if left in inconsistent state
PHPBB3-9892
This commit is contained in:
@@ -1913,6 +1913,30 @@ function change_database_data(&$no_updates, $version)
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
global $db_tools;
|
||||
|
||||
// Recover from potentially broken Q&A CAPTCHA table on firebird
|
||||
if ($db_tools->sql_layer == 'firebird')
|
||||
{
|
||||
if ($config['captcha_plugin'] == 'phpbb_captcha_qa')
|
||||
{
|
||||
setconfig('captcha_plugin', 'phpbb_captcha_nogd');
|
||||
}
|
||||
|
||||
$tables = array(
|
||||
$table_prefix . 'captcha_questions',
|
||||
$table_prefix . 'captcha_answers',
|
||||
$table_prefix . 'qa_confirm',
|
||||
);
|
||||
foreach ($tables as $table)
|
||||
{
|
||||
if ($db_tools->sql_table_exists($table))
|
||||
{
|
||||
$db_tools->sql_table_drop($table);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$no_updates = false;
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user