From fa84400d288374f9c702757cc619db815a65fefb Mon Sep 17 00:00:00 2001 From: Henry Sudhof Date: Tue, 7 Jul 2009 09:22:01 +0000 Subject: [PATCH] restore firebird/sqlite support. TODO - the DBAL should handle this git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9718 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/acp/acp_main.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/phpBB/includes/acp/acp_main.php b/phpBB/includes/acp/acp_main.php index 42f6aa0b8e..e0d6a3f01c 100644 --- a/phpBB/includes/acp/acp_main.php +++ b/phpBB/includes/acp/acp_main.php @@ -354,11 +354,19 @@ class acp_main $tables = array(CONFIRM_TABLE, SESSIONS_TABLE); - // DELETE would probably take a lot longer if we're dealing with a runaway table foreach ($tables as $table) { - $sql = "TRUNCATE TABLE $table"; - $db->sql_query($sql); + switch ($db->sql_layer) + { + case 'sqlite': + case 'firebird': + $db->sql_query("DELETE FROM $table"); + break; + + default: + $db->sql_query("TRUNCATE TABLE $table"); + break; + } } // let's restore the admin session