From b870474810e7b513b70755c80e3eeb3105b4116b Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Thu, 27 Dec 2007 17:34:05 +0000 Subject: #16695 #s17235 git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8290 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/install/install_convert.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'phpBB/install/install_convert.php') diff --git a/phpBB/install/install_convert.php b/phpBB/install/install_convert.php index d1e36ec4a4..f1544c931a 100644 --- a/phpBB/install/install_convert.php +++ b/phpBB/install/install_convert.php @@ -422,8 +422,7 @@ class install_convert extends module } else { - $src_dbpasswd = htmlspecialchars_decode($src_dbpasswd); - $connect_test = connect_check_db(true, $error, $available_dbms[$src_dbms], $src_table_prefix, $src_dbhost, $src_dbuser, $src_dbpasswd, $src_dbname, $src_dbport, true, ($src_dbms == $dbms) ? false : true, false); + $connect_test = connect_check_db(true, $error, $available_dbms[$src_dbms], $src_table_prefix, $src_dbhost, $src_dbuser, htmlspecialchars_decode($src_dbpasswd), $src_dbname, $src_dbport, true, ($src_dbms == $dbms) ? false : true, false); } // The forum prefix of the old and the new forum can only be the same if two different databases are used. @@ -443,7 +442,7 @@ class install_convert extends module { $sql_db = 'dbal_' . $src_dbms; $src_db = new $sql_db(); - $src_db->sql_connect($src_dbhost, $src_dbuser, $src_dbpasswd, $src_dbname, $src_dbport, false, true); + $src_db->sql_connect($src_dbhost, $src_dbuser, htmlspecialchars_decode($src_dbpasswd), $src_dbname, $src_dbport, false, true); $same_db = false; } else @@ -666,7 +665,7 @@ class install_convert extends module } $sql_db = 'dbal_' . $convert->src_dbms; $src_db = new $sql_db(); - $src_db->sql_connect($convert->src_dbhost, $convert->src_dbuser, $convert->src_dbpasswd, $convert->src_dbname, $convert->src_dbport, false, true); + $src_db->sql_connect($convert->src_dbhost, $convert->src_dbuser, htmlspecialchars_decode($convert->src_dbpasswd), $convert->src_dbname, $convert->src_dbport, false, true); $same_db = false; } else -- cgit v1.2.1 From 6accc46024d436e69802793956653412cde8f404 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Sat, 23 Feb 2008 13:18:33 +0000 Subject: some language/style/code fixes (refer to the diff of the changelog) git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8389 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/install/install_convert.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'phpBB/install/install_convert.php') diff --git a/phpBB/install/install_convert.php b/phpBB/install/install_convert.php index f1544c931a..7a2adf8ffd 100644 --- a/phpBB/install/install_convert.php +++ b/phpBB/install/install_convert.php @@ -1218,7 +1218,7 @@ class install_convert extends module $template->assign_block_vars('checks', array( 'TITLE' => "skip_rows = $skip_rows", - 'RESULT' => $rows . ((defined('DEBUG_EXTRA') && function_exists('memory_get_usage')) ? ceil(memory_get_usage()/1024) . ' KB' : ''), + 'RESULT' => $rows . ((defined('DEBUG_EXTRA') && function_exists('memory_get_usage')) ? ceil(memory_get_usage()/1024) . ' ' . $user->lang['KIB'] : ''), )); $mtime = explode(' ', microtime()); @@ -1489,7 +1489,7 @@ class install_convert extends module sync('topic', 'range', 'topic_id BETWEEN ' . $sync_batch . ' AND ' . $end, true, true); $template->assign_block_vars('checks', array( - 'TITLE' => sprintf($user->lang['SYNC_TOPIC_ID'], $sync_batch, ($sync_batch + $batch_size)) . ((defined('DEBUG_EXTRA') && function_exists('memory_get_usage')) ? ' [' . ceil(memory_get_usage()/1024) . ' KB]' : ''), + 'TITLE' => sprintf($user->lang['SYNC_TOPIC_ID'], $sync_batch, ($sync_batch + $batch_size)) . ((defined('DEBUG_EXTRA') && function_exists('memory_get_usage')) ? ' [' . ceil(memory_get_usage()/1024) . ' ' . $user->lang['KIB'] . ']' : ''), 'RESULT' => $user->lang['DONE'], )); -- cgit v1.2.1 From b4ca6fdc4e322470f3dae9eb98c3595a841fcb77 Mon Sep 17 00:00:00 2001 From: Vic D'Elfant Date: Mon, 25 Feb 2008 13:04:49 +0000 Subject: This will prevent a php warning from being printed (and the layout getting ruined) in case of a conflicting permission restriction such as open_basedir git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8400 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/install/install_convert.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/install/install_convert.php') diff --git a/phpBB/install/install_convert.php b/phpBB/install/install_convert.php index 7a2adf8ffd..081b1a6c31 100644 --- a/phpBB/install/install_convert.php +++ b/phpBB/install/install_convert.php @@ -407,7 +407,7 @@ class install_convert extends module $error = array(); if ($submit) { - if (!file_exists('./../' . $forum_path . '/' . $test_file)) + if (!@file_exists('./../' . $forum_path . '/' . $test_file)) { $error[] = sprintf($lang['COULD_NOT_FIND_PATH'], $forum_path); } -- cgit v1.2.1 From bf9723dc2cbf9575c5029d54636a65f970a099e1 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Sat, 7 Jun 2008 13:50:39 +0000 Subject: #28635 git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8615 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/install/install_convert.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'phpBB/install/install_convert.php') diff --git a/phpBB/install/install_convert.php b/phpBB/install/install_convert.php index 081b1a6c31..25d8551df4 100644 --- a/phpBB/install/install_convert.php +++ b/phpBB/install/install_convert.php @@ -298,7 +298,7 @@ class install_convert extends module if (isset($convertor_data)) { $sort[strtolower($convertor_data['forum_name'])] = sizeof($convertors); - + $convertors[] = array( 'tag' => $m[1], 'forum_name' => $convertor_data['forum_name'], @@ -585,7 +585,7 @@ class install_convert extends module function convert_data($sub) { global $template, $user, $phpbb_root_path, $phpEx, $db, $lang, $config, $cache; - global $convert, $convert_row, $message_parser, $skip_rows; + global $convert, $convert_row, $message_parser, $skip_rows, $language; require($phpbb_root_path . 'config.' . $phpEx); require($phpbb_root_path . 'includes/constants.' . $phpEx); @@ -891,7 +891,7 @@ class install_convert extends module { $table = $convert->src_table_prefix . $m[1]; $tables_list[$table] = $table; - + if (!empty($m[3])) { $aliases[] = $convert->src_table_prefix . $m[3]; @@ -948,7 +948,7 @@ class install_convert extends module // Throw an error if some tables are missing // We used to do some guessing here, but since we have a suggestion of possible values earlier, I don't see it adding anything here to do it again - + if (sizeof($missing_tables) == sizeof($tables_list)) { $this->p_master->error($user->lang['NO_TABLES_FOUND'] . ' ' . $user->lang['CHECK_TABLE_PREFIX'], __LINE__, __FILE__); @@ -1299,7 +1299,7 @@ class install_convert extends module if ($errored) { $db->sql_return_on_error(true); - + // Because it errored out we will try to insert the rows one by one... most of the time this // is caused by duplicate entries - but we also do not want to miss one... foreach ($waiting_rows as $waiting_sql) @@ -1607,7 +1607,7 @@ class install_convert extends module 'TITLE' => $user->lang['UPDATE_TOPICS_POSTED'], 'RESULT' => $user->lang['DONE'], )); - + if ($db->sql_error_triggered) { $template->assign_vars(array( @@ -1617,7 +1617,7 @@ class install_convert extends module )); } $db->sql_return_on_error(false); - + $this->finish_conversion(); return; } @@ -1949,7 +1949,7 @@ class install_convert extends module $firstkey_set = false; $firstkey = 0; - + foreach ($fields[1] as $inner_key => $inner_value) { if (!$firstkey_set) @@ -1974,7 +1974,7 @@ class install_convert extends module { $sql_flag = true; } - + // No function assigned? if (empty($fields[2])) { -- cgit v1.2.1 From 2fcd96ca72741bdfb36c24a0af9dd8230b5a828f Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Thu, 4 Sep 2008 12:01:47 +0000 Subject: Ok, story real database server info, as well as caching it Store it on installation too - allows us to check the db version used on installation and used currently to warn the user about incompatibilities git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8814 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/install/install_convert.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/install/install_convert.php') diff --git a/phpBB/install/install_convert.php b/phpBB/install/install_convert.php index 25d8551df4..7a4155e09d 100644 --- a/phpBB/install/install_convert.php +++ b/phpBB/install/install_convert.php @@ -685,7 +685,7 @@ class install_convert extends module // Thanks MySQL, for silently converting... case 'mysql': case 'mysql4': - if (version_compare($src_db->mysql_version, '4.1.3', '>=')) + if (version_compare($src_db->sql_server_info(true), '4.1.3', '>=')) { $convert->mysql_convert = true; } -- cgit v1.2.1 From c32f49679f635175d43de7264ee09782c56c628e Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Tue, 23 Jun 2009 10:48:53 +0000 Subject: - add options for quick reply (forum-based and board-wide) - add option for minimum post chars (which is a required setting for quick reply, therefore we introduce it here) git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9656 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/install/install_convert.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'phpBB/install/install_convert.php') diff --git a/phpBB/install/install_convert.php b/phpBB/install/install_convert.php index 7a4155e09d..38bfe96fcd 100644 --- a/phpBB/install/install_convert.php +++ b/phpBB/install/install_convert.php @@ -611,7 +611,7 @@ class install_convert extends module $config['max_quote_depth'] = 0; // @todo Need to confirm that max post length in source is <= max post length in destination or there may be interesting formatting issues - $config['max_post_chars'] = 0; + $config['max_post_chars'] = $config['min_post_chars'] = 0; // Set up a user as well. We _should_ have enough of a database here at this point to do this // and it helps for any core code we call @@ -989,7 +989,7 @@ class install_convert extends module $config['max_quote_depth'] = 0; // @todo Need to confirm that max post length in source is <= max post length in destination or there may be interesting formatting issues - $config['max_post_chars'] = 0; + $config['max_post_chars'] = $config['min_post_chars'] = 0; } $template->assign_block_vars('checks', array( -- cgit v1.2.1 From 090ab9bf0567734c951879b264744d16f41eceb3 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Fri, 7 Aug 2009 12:50:25 +0000 Subject: Bug #49215 again. git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9936 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/install/install_convert.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'phpBB/install/install_convert.php') diff --git a/phpBB/install/install_convert.php b/phpBB/install/install_convert.php index 38bfe96fcd..7f1b9de5b6 100644 --- a/phpBB/install/install_convert.php +++ b/phpBB/install/install_convert.php @@ -1558,7 +1558,7 @@ class install_convert extends module */ function finish_conversion() { - global $db, $phpbb_root_path, $convert, $config, $language, $user, $template; + global $db, $phpbb_root_path, $phpEx, $convert, $config, $language, $user, $template; $db->sql_query('DELETE FROM ' . CONFIG_TABLE . " WHERE config_name = 'convert_progress' @@ -1567,7 +1567,7 @@ class install_convert extends module OR config_name = 'convert_db_user'"); $db->sql_query('DELETE FROM ' . SESSIONS_TABLE); - @unlink($phpbb_root_path . 'cache/data_global.php'); + @unlink($phpbb_root_path . 'cache/data_global.' . $phpEx); cache_moderators(); // And finally, add a note to the log -- cgit v1.2.1 From 1802b9ff9286a7fc24493e71b3432816cbdbfcd8 Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Thu, 11 Feb 2010 00:02:51 +0000 Subject: Support for Microsoft's Native SQL Server Driver for PHP - Patch by Chris Pucci at Microsoft [Bug #57055] If you are using SQL Server, please try to test this new dbal so we can safely include it in 3.0.8. If you want to try it on a current phpBB version you can apply the latest version of the patch to your board which you can find attached to the bug tracker ticket (look in the comments for the latest version, the one in the ticket itself is outdated): http://www.phpbb.com/bugs/phpbb3/ticket.php?ticket_id=57055 git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10489 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/install/install_convert.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'phpBB/install/install_convert.php') diff --git a/phpBB/install/install_convert.php b/phpBB/install/install_convert.php index 7f1b9de5b6..06c3a8b4a6 100644 --- a/phpBB/install/install_convert.php +++ b/phpBB/install/install_convert.php @@ -1248,6 +1248,7 @@ class install_convert extends module { case 'mssql': case 'mssql_odbc': + case 'mssqlnative': $db->sql_query('SET IDENTITY_INSERT ' . $schema['target'] . ' ON'); break; } @@ -1375,6 +1376,7 @@ class install_convert extends module { case 'mssql': case 'mssql_odbc': + case 'mssqlnative': $db->sql_query('SET IDENTITY_INSERT ' . $schema['target'] . ' OFF'); break; -- cgit v1.2.1