aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_convert.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/functions_convert.php')
-rw-r--r--phpBB/includes/functions_convert.php18
1 files changed, 7 insertions, 11 deletions
diff --git a/phpBB/includes/functions_convert.php b/phpBB/includes/functions_convert.php
index ed35be3db7..7498882e7c 100644
--- a/phpBB/includes/functions_convert.php
+++ b/phpBB/includes/functions_convert.php
@@ -1620,10 +1620,9 @@ function mass_auth($ug_type, $forum_id, $ug_id, $acl_list, $setting = ACL_NO)
switch ($sql_type)
{
case 'insert':
- switch ($db->sql_layer)
+ switch ($db->dbms_type)
{
case 'mysql':
- case 'mysql4':
$sql = 'VALUES ' . implode(', ', preg_replace('#^(.*?)$#', '(\1)', $sql_subary));
break;
@@ -1977,16 +1976,13 @@ function update_topics_posted()
{
global $db, $config;
- switch ($db->sql_layer)
+ if ($db->truncate)
{
- case 'sqlite':
- case 'firebird':
- $db->sql_query('DELETE FROM ' . TOPICS_POSTED_TABLE);
- break;
-
- default:
- $db->sql_query('TRUNCATE TABLE ' . TOPICS_POSTED_TABLE);
- break;
+ $db->sql_query('DELETE FROM ' . TOPICS_POSTED_TABLE);
+ }
+ else
+ {
+ $db->sql_query('TRUNCATE TABLE ' . TOPICS_POSTED_TABLE);
}
// This can get really nasty... therefore we only do the last six months