mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
[ticket/16741] General fixes
PHPBB3-16741
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
namespace phpbb\convert\controller;
|
||||
|
||||
use phpbb\cache\driver\driver_interface;
|
||||
use phpbb\db\doctrine\connection_factory;
|
||||
use phpbb\exception\http_exception;
|
||||
use phpbb\install\controller\helper;
|
||||
use phpbb\install\helper\container_factory;
|
||||
@@ -25,6 +26,7 @@ use phpbb\install\helper\navigation\navigation_provider;
|
||||
use phpbb\language\language;
|
||||
use phpbb\request\request_interface;
|
||||
use phpbb\template\template;
|
||||
use PHPUnit\DbUnit\Database\Connection;
|
||||
use Symfony\Component\HttpFoundation\StreamedResponse;
|
||||
|
||||
/**
|
||||
@@ -76,6 +78,11 @@ class convertor
|
||||
*/
|
||||
protected $db;
|
||||
|
||||
/**
|
||||
* @var Connection
|
||||
*/
|
||||
protected $db_doctrine;
|
||||
|
||||
/**
|
||||
* @var install_helper
|
||||
*/
|
||||
@@ -165,10 +172,11 @@ class convertor
|
||||
|
||||
$this->controller_helper->handle_language_select();
|
||||
|
||||
$this->cache = $container->get('cache.driver');
|
||||
$this->config = $container->get('config');
|
||||
$this->cache = $container->get('cache.driver');
|
||||
$this->config = $container->get('config');
|
||||
$this->config_php_file = new \phpbb\config_php_file($this->phpbb_root_path, $this->php_ext);
|
||||
$this->db = $container->get('dbal.conn.driver');
|
||||
$this->db = $container->get('dbal.conn.driver');
|
||||
$this->db_doctrine = $container->get('dbal.conn.doctrine');
|
||||
|
||||
$this->config_table = $container->get_parameter('tables.config');
|
||||
$this->session_keys_table = $container->get_parameter('tables.sessions_keys');
|
||||
@@ -507,11 +515,13 @@ class convertor
|
||||
/** @var \phpbb\db\driver\driver_interface $src_db */
|
||||
$src_db = new $src_dbms();
|
||||
$src_db->sql_connect($src_dbhost, $src_dbuser, htmlspecialchars_decode($src_dbpasswd, ENT_COMPAT), $src_dbname, $src_dbport, false, true);
|
||||
$src_db_doctrine = connection_factory::get_connection_from_params($src_dbms, $src_dbhost, $src_dbuser, htmlspecialchars_decode($src_dbpasswd, ENT_COMPAT), $src_dbname, $src_dbport);
|
||||
$same_db = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$src_db = $this->db;
|
||||
$src_db_doctrine = $this->db_doctrine;
|
||||
$same_db = true;
|
||||
}
|
||||
|
||||
@@ -526,7 +536,7 @@ class convertor
|
||||
$prefixes = array();
|
||||
|
||||
$db_tools_factory = new \phpbb\db\tools\factory();
|
||||
$db_tools = $db_tools_factory->get($src_db);
|
||||
$db_tools = $db_tools_factory->get($src_db_doctrine);
|
||||
$tables_existing = $db_tools->sql_list_tables();
|
||||
$tables_existing = array_map('strtolower', $tables_existing);
|
||||
foreach ($tables_existing as $table_name)
|
||||
|
@@ -1876,11 +1876,7 @@ function phpbb_check_username_collisions()
|
||||
|
||||
function phpbb_convert_timezone($timezone)
|
||||
{
|
||||
global $config, $db, $phpbb_root_path, $phpEx, $table_prefix;
|
||||
|
||||
$factory = new \phpbb\db\tools\factory();
|
||||
$timezone_migration = new \phpbb\db\migration\data\v310\timezone($config, $db, $factory->get($db), $phpbb_root_path, $phpEx, $table_prefix);
|
||||
return $timezone_migration->convert_phpbb30_timezone($timezone, 0);
|
||||
return \phpbb\db\migration\data\v310\timezone::convert_phpbb30_timezone($timezone, 0);
|
||||
}
|
||||
|
||||
function phpbb_add_notification_options($user_notify_pm)
|
||||
|
Reference in New Issue
Block a user