From 84f795e9fbd172924280593d575bf4587c9b40e5 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Sun, 22 Feb 2009 18:06:05 +0000 Subject: $db-> to phpbb::$db-> git-svn-id: file:///svn/phpbb/trunk@9336 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/install/database_update.php | 2 +- phpBB/install/install_install.php | 2 +- phpBB/install/install_update.php | 22 +++++++++++----------- 3 files changed, 13 insertions(+), 13 deletions(-) (limited to 'phpBB/install') diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index f72f963bff..c9dd0a523f 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -239,7 +239,7 @@ _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 ($db->dbms_type) +switch (phpbb::$db->dbms_type) { case 'mysql': $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'; diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php index 8543061976..97ff0f1508 100644 --- a/phpBB/install/install_install.php +++ b/phpBB/install/install_install.php @@ -1488,7 +1488,7 @@ class install_install extends module if (!$user_id) { // If we can't insert this user then continue to the next one to avoid inconsistant data - $this->p_master->db_error('Unable to insert bot into users table', $db->sql_error_sql, __LINE__, __FILE__); + $this->p_master->db_error('Unable to insert bot into users table', phpbb::$db->sql_error_sql, __LINE__, __FILE__); continue; } diff --git a/phpBB/install/install_update.php b/phpBB/install/install_update.php index 19cf3051c9..2040bf8dd2 100644 --- a/phpBB/install/install_update.php +++ b/phpBB/install/install_update.php @@ -414,9 +414,9 @@ class install_update extends module $sql = 'SELECT * FROM ' . STYLES_THEME_TABLE . " WHERE theme_name = 'prosilver'"; - $result = $db->sql_query($sql); - $theme = $db->sql_fetchrow($result); - $db->sql_freeresult($result); + $result = phpbb::$db->sql_query($sql); + $theme = phpbb::$db->sql_fetchrow($result); + phpbb::$db->sql_freeresult($result); if ($theme) { @@ -461,17 +461,17 @@ class install_update extends module 'theme_data' => $theme['theme_data'] ); - $sql = 'UPDATE ' . STYLES_THEME_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . ' + $sql = 'UPDATE ' . STYLES_THEME_TABLE . ' SET ' . phpbb::$db->sql_build_array('UPDATE', $sql_ary) . ' WHERE theme_id = ' . $theme['theme_id']; - $db->sql_query($sql); + phpbb::$db->sql_query($sql); phpbb::$acm->destroy_sql(STYLES_THEME_TABLE); } } - $db->sql_return_on_error(true); - $db->sql_query('DELETE FROM ' . CONFIG_TABLE . " WHERE config_name = 'version_update_from'"); - $db->sql_return_on_error(false); + phpbb::$db->sql_return_on_error(true); + phpbb::$db->sql_query('DELETE FROM ' . CONFIG_TABLE . " WHERE config_name = 'version_update_from'"); + phpbb::$db->sql_return_on_error(false); phpbb::$acm->purge(); } @@ -1513,14 +1513,14 @@ class install_update extends module $sql = 'SELECT template_name, template_path FROM ' . STYLES_TEMPLATE_TABLE . " WHERE LOWER(template_name) NOT IN ('subsilver2', 'prosilver')"; - $result = $db->sql_query($sql); + $result = phpbb::$db->sql_query($sql); $templates = array(); - while ($row = $db->sql_fetchrow($result)) + while ($row = phpbb::$db->sql_fetchrow($result)) { $templates[] = $row; } - $db->sql_freeresult($result); + phpbb::$db->sql_freeresult($result); if (sizeof($templates)) { -- cgit v1.2.1