aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/install/database_update.php24
1 files changed, 24 insertions, 0 deletions
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php
index 7bf41c8450..dce77a67d7 100644
--- a/phpBB/install/database_update.php
+++ b/phpBB/install/database_update.php
@@ -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;
}