mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
[ticket/9892] Drop Q&A CAPTCHA tables if left in inconsistent state
PHPBB3-9892
This commit is contained in:
parent
025649e14c
commit
32f37bf938
1 changed files with 24 additions and 0 deletions
|
@ -1913,6 +1913,30 @@ function change_database_data(&$no_updates, $version)
|
||||||
}
|
}
|
||||||
$db->sql_freeresult($result);
|
$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;
|
$no_updates = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue