From 9a685e7a4839058a99ddcb5f9c79c126f5ce318b Mon Sep 17 00:00:00 2001 From: David M Date: Thu, 1 Feb 2007 03:13:08 +0000 Subject: - should fix some Firebird issues ( can't believe that nobody found this until now ) git-svn-id: file:///svn/phpbb/trunk@6954 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions_convert.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'phpBB/includes/functions_convert.php') diff --git a/phpBB/includes/functions_convert.php b/phpBB/includes/functions_convert.php index 14dd4c370b..ab903ac2ad 100644 --- a/phpBB/includes/functions_convert.php +++ b/phpBB/includes/functions_convert.php @@ -1833,7 +1833,17 @@ function update_topics_posted() { global $db, $config; - $db->sql_query((($db->sql_layer != 'sqlite') ? 'TRUNCATE TABLE ' : 'DELETE FROM ') . TOPICS_POSTED_TABLE); + switch ($db->sql_layer) + { + case 'sqlite': + case 'firebird': + $db->sql_query('DELETE FROM ' . TOPICS_POSTED_TABLE); + break; + + default: + $db->sql_query('TRUNCATE TABLE ' . TOPICS_POSTED_TABLE); + break; + } // This can get really nasty... therefore we only do the last six months $get_from_time = time() - (6 * 4 * 7 * 24 * 60 * 60); -- cgit v1.2.1