aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_convert.php
diff options
context:
space:
mode:
authorDavid M <davidmj@users.sourceforge.net>2008-01-07 15:19:38 +0000
committerDavid M <davidmj@users.sourceforge.net>2008-01-07 15:19:38 +0000
commit2928574ed46334bb8dbbb6612a62db3c3654ba12 (patch)
treec010569c70e52dbda45dd835a613977fb30f9dc8 /phpBB/includes/functions_convert.php
parent159ce6f8d1bddbe7afc055f70cab3107b9c74a5f (diff)
downloadforums-2928574ed46334bb8dbbb6612a62db3c3654ba12.tar
forums-2928574ed46334bb8dbbb6612a62db3c3654ba12.tar.gz
forums-2928574ed46334bb8dbbb6612a62db3c3654ba12.tar.bz2
forums-2928574ed46334bb8dbbb6612a62db3c3654ba12.tar.xz
forums-2928574ed46334bb8dbbb6612a62db3c3654ba12.zip
- a few tiny clean ups
- a new MS SQL DBAL, it does not work so hot because of issues with the extension it depends on git-svn-id: file:///svn/phpbb/trunk@8313 89ea8834-ac86-4346-8a33-228a782c2dd0
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