aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2011-06-12 10:49:48 +0200
committerNils Adermann <naderman@naderman.de>2011-06-12 11:02:21 +0200
commit32f37bf938efe7a85b72ad2429e715269abc6fee (patch)
treeb794d0df20cc10f565f0e793abdc8ad99b297076
parent025649e14cf4a4678f26790fa4328b25a3f040cf (diff)
downloadforums-32f37bf938efe7a85b72ad2429e715269abc6fee.tar
forums-32f37bf938efe7a85b72ad2429e715269abc6fee.tar.gz
forums-32f37bf938efe7a85b72ad2429e715269abc6fee.tar.bz2
forums-32f37bf938efe7a85b72ad2429e715269abc6fee.tar.xz
forums-32f37bf938efe7a85b72ad2429e715269abc6fee.zip
[ticket/9892] Drop Q&A CAPTCHA tables if left in inconsistent state
PHPBB3-9892
-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;
}