aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp/acp_main.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/acp/acp_main.php')
-rw-r--r--phpBB/includes/acp/acp_main.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/phpBB/includes/acp/acp_main.php b/phpBB/includes/acp/acp_main.php
index fad9ad47b7..bf958ba319 100644
--- a/phpBB/includes/acp/acp_main.php
+++ b/phpBB/includes/acp/acp_main.php
@@ -147,7 +147,17 @@ class acp_main
break;
case 'db_track':
- $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);