diff options
| author | Meik Sievertsen <acydburn@phpbb.com> | 2006-10-14 14:56:46 +0000 |
|---|---|---|
| committer | Meik Sievertsen <acydburn@phpbb.com> | 2006-10-14 14:56:46 +0000 |
| commit | 4afaca12dc55b076293e9ef8ac28332d22730df0 (patch) | |
| tree | 944b15618d8a0bed05fafb942e27322a739b2d3d /phpBB/install/database_update.php | |
| parent | 46922674ea1b5ecf96d14c0edfdbcf6af3743051 (diff) | |
| download | forums-4afaca12dc55b076293e9ef8ac28332d22730df0.tar forums-4afaca12dc55b076293e9ef8ac28332d22730df0.tar.gz forums-4afaca12dc55b076293e9ef8ac28332d22730df0.tar.bz2 forums-4afaca12dc55b076293e9ef8ac28332d22730df0.tar.xz forums-4afaca12dc55b076293e9ef8ac28332d22730df0.zip | |
- store sql_layer directly within the layer itself
- new method sql_multi_insert to circumvent db-specific hacks
(hopefully not introduced any parsing errors)
git-svn-id: file:///svn/phpbb/trunk@6497 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/install/database_update.php')
| -rw-r--r-- | phpBB/install/database_update.php | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index 155ab2350e..ee6da65633 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -304,9 +304,7 @@ $database_update_info = array( ); // Determine mapping database type -$map_dbms = SQL_LAYER; - -switch (SQL_LAYER) +switch ($db->sql_layer) { case 'mysql': $map_dbms = 'mysql_40'; @@ -321,6 +319,10 @@ switch (SQL_LAYER) case 'mssql_odbc': $map_dbms = 'mssql'; break; + + default: + $map_dbms = $db->sql_layer; + break; } $error_ary = array(); @@ -356,7 +358,7 @@ $errored = false; <br /> - <p><?php echo $lang['DATABASE_TYPE']; ?> :: <strong><?php echo SQL_LAYER; ?></strong><br /> + <p><?php echo $lang['DATABASE_TYPE']; ?> :: <strong><?php echo $db->sql_layer; ?></strong><br /> <?php $sql = "SELECT config_value @@ -490,9 +492,10 @@ _sql($sql, $errored, $error_ary); // Optimize/vacuum analyze the tables where appropriate // this should be done for each version in future along with // the version number update -switch (SQL_LAYER) +switch ($db->sql_layer) { case 'mysql': + case 'mysqli': case 'mysql4': $sql = 'OPTIMIZE TABLE ' . $table_prefix . 'auth_access, ' . $table_prefix . 'banlist, ' . $table_prefix . 'categories, ' . $table_prefix . 'config, ' . $table_prefix . 'disallow, ' . $table_prefix . 'forum_prune, ' . $table_prefix . 'forums, ' . $table_prefix . 'groups, ' . $table_prefix . 'posts, ' . $table_prefix . 'posts_text, ' . $table_prefix . 'privmsgs, ' . $table_prefix . 'privmsgs_text, ' . $table_prefix . 'ranks, ' . $table_prefix . 'search_results, ' . $table_prefix . 'search_wordlist, ' . $table_prefix . 'search_wordmatch, ' . $table_prefix . 'sessions_keys' . $table_prefix . 'smilies, ' . $table_prefix . 'themes, ' . $table_prefix . 'themes_name, ' . $table_prefix . 'topics, ' . $table_prefix . 'topics_watch, ' . $table_prefix . 'user_group, ' . $table_prefix . 'users, ' . $table_prefix . 'vote_desc, ' . $table_prefix . 'vote_results, ' . $table_prefix . 'vote_voters, ' . $table_prefix . 'words'; _sql($sql, $errored, $error_ary); |
