diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2005-01-09 20:01:20 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2005-01-09 20:01:20 +0000 |
commit | e5ae182a38fb5ecf2157528d1b089943cb5de7e0 (patch) | |
tree | a65deed09e81f6c62082feff0a27b0ca0c0ba9cd /phpBB/includes/functions_admin.php | |
parent | fdac7fa8003d546912cff892e410fdddc262ec54 (diff) | |
download | forums-e5ae182a38fb5ecf2157528d1b089943cb5de7e0.tar forums-e5ae182a38fb5ecf2157528d1b089943cb5de7e0.tar.gz forums-e5ae182a38fb5ecf2157528d1b089943cb5de7e0.tar.bz2 forums-e5ae182a38fb5ecf2157528d1b089943cb5de7e0.tar.xz forums-e5ae182a38fb5ecf2157528d1b089943cb5de7e0.zip |
- interbase/firebird 1.5+ support (still needs some tweaking)
git-svn-id: file:///svn/phpbb/trunk@5051 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_admin.php')
-rw-r--r-- | phpBB/includes/functions_admin.php | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php index 8a49053345..7aba44595a 100644 --- a/phpBB/includes/functions_admin.php +++ b/phpBB/includes/functions_admin.php @@ -1501,7 +1501,7 @@ function split_sql_file($sql, $delimiter) for ($i = 0; $i < $token_count; $i++) { // Don't wanna add an empty string as the last thing in the array. - if ($i != $token_count - 1 || strlen($tokens[$i] > 0)) + if ($i != $token_count - 1) { // This is the total number of single quotes in the token. $total_quotes = preg_match_all("#'#", $tokens[$i], $matches); @@ -1639,12 +1639,12 @@ function cache_moderators() switch (SQL_LAYER) { case 'mysql': - case 'mysql4': $sql = 'INSERT INTO ' . MODERATOR_TABLE . ' (forum_id, user_id, username, group_id, groupname) VALUES ' . implode(', ', preg_replace('#^(.*)$#', '(\1)', $m_sql)); $db->sql_query($sql); break; + case 'mysql4': case 'mssql': case 'sqlite': $sql = 'INSERT INTO ' . MODERATOR_TABLE . ' (forum_id, user_id, username, group_id, groupname) @@ -1949,10 +1949,10 @@ if (class_exists('auth')) switch (SQL_LAYER) { case 'mysql': - case 'mysql4': $sql = 'VALUES ' . implode(', ', preg_replace('#^(.*?)$#', '(\1)', $sql_subary)); break; + case 'mysql4': case 'mssql': case 'sqlite': $sql = implode(' UNION ALL ', preg_replace('#^(.*?)$#', 'SELECT \1', $sql_subary)); @@ -2091,12 +2091,15 @@ if (class_exists('auth')) switch (SQL_LAYER) { case 'mysql': - case 'mysql4': $sql .= (($sql != '') ? ', ' : '') . "('$option', " . $type_sql[$type] . ")"; break; + + case 'mysql4': case 'mssql': + case 'sqlite': $sql .= (($sql != '') ? ' UNION ALL ' : '') . " SELECT '$option', " . $type_sql[$type]; break; + default: $sql = 'INSERT INTO ' . ACL_OPTIONS_TABLE . " (auth_option, is_global, is_local) VALUES ($option, " . $type_sql[$type] . ")"; |