1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

[ticket/16345] Small improvements

PHPBB3-16346
This commit is contained in:
rubencm
2020-06-07 02:15:35 +00:00
parent 3cceeb45bf
commit 774c609c4a
284 changed files with 1380 additions and 835 deletions

View File

@@ -21,6 +21,7 @@ use phpbb\install\installer;
use phpbb\language\language;
use phpbb\request\request_interface;
use phpbb\template\template;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\StreamedResponse;
/**

View File

@@ -47,7 +47,7 @@ class container_factory
/**
* The full phpBB container
*
* @var \Symfony\Component\DependencyInjection\ContainerInterface
* @var \Symfony\Component\DependencyInjection\ContainerInterface|null
*/
protected $container;

View File

@@ -388,6 +388,7 @@ class database
OR PARAMETER = 'NLS_CHARACTERSET'";
$result = $db->sql_query($sql);
$stats = [];
while ($row = $db->sql_fetchrow($result))
{
$stats[$row['parameter']] = $row['value'];

View File

@@ -21,7 +21,7 @@ use phpbb\install\helper\update_helper;
class compression_file_updater implements file_updater_interface
{
/**
* @var \compress
* @var \compress|null
*/
protected $compress;

View File

@@ -21,7 +21,7 @@ use phpbb\install\helper\update_helper;
class ftp_file_updater implements file_updater_interface
{
/**
* @var \transfer
* @var \transfer|null
*/
protected $transfer;

View File

@@ -38,7 +38,7 @@ class cli_iohandler extends iohandler_base
protected $input_values = array();
/**
* @var \Symfony\Component\Console\Helper\ProgressBar
* @var \Symfony\Component\Console\Helper\ProgressBar|null
*/
protected $progress_bar;

View File

@@ -26,7 +26,7 @@ class factory
protected $container;
/**
* @var string
* @var string|null
*/
protected $environment;

View File

@@ -45,7 +45,7 @@ class installer
protected $install_config;
/**
* @var ordered_service_collection
* @var ordered_service_collection|null
*/
protected $installer_modules;

View File

@@ -30,11 +30,6 @@ class add_modules extends \phpbb\install\task_base
*/
protected $db;
/**
* @var \phpbb\extension\manager
*/
protected $extension_manager;
/**
* @var \phpbb\install\helper\iohandler\iohandler_interface
*/
@@ -154,7 +149,6 @@ class add_modules extends \phpbb\install\task_base
{
$this->config = $config;
$this->db = $container->get('dbal.conn');
$this->extension_manager = $container->get('ext.manager');
$this->iohandler = $iohandler;
$this->module_manager = $container->get('module.manager');

View File

@@ -18,7 +18,6 @@ use phpbb\db\driver\driver_interface;
use phpbb\event\dispatcher;
use phpbb\config\config;
use phpbb\install\helper\container_factory;
use phpbb\language\language;
use phpbb\search\fulltext_native;
use phpbb\user;
@@ -44,11 +43,6 @@ class create_search_index extends \phpbb\install\task_base
*/
protected $phpbb_dispatcher;
/**
* @var language
*/
protected $language;
/**
* @var user
*/
@@ -78,7 +72,6 @@ class create_search_index extends \phpbb\install\task_base
$this->auth = $container->get('auth');
$this->config = $config;
$this->db = $container->get('dbal.conn');
$this->language = $container->get('language');
$this->phpbb_dispatcher = $container->get('dispatcher');
$this->user = $container->get('user');

View File

@@ -35,11 +35,6 @@ class add_tables extends \phpbb\install\task_base
*/
protected $db_tools;
/**
* @var \phpbb\filesystem\filesystem_interface
*/
protected $filesystem;
/**
* @var string
*/
@@ -50,12 +45,10 @@ class add_tables extends \phpbb\install\task_base
*
* @param \phpbb\install\helper\config $config
* @param \phpbb\install\helper\database $db_helper
* @param \phpbb\filesystem\filesystem_interface $filesystem
* @param string $phpbb_root_path
*/
public function __construct(\phpbb\install\helper\config $config,
\phpbb\install\helper\database $db_helper,
\phpbb\filesystem\filesystem_interface $filesystem,
$phpbb_root_path)
{
$dbms = $db_helper->get_available_dbms($config->get('dbms'));
@@ -75,7 +68,6 @@ class add_tables extends \phpbb\install\task_base
$this->config = $config;
$this->db_tools = $factory->get($this->db);
$this->filesystem = $filesystem;
$this->schema_file_path = $phpbb_root_path . 'store/schema.json';
parent::__construct(true);

View File

@@ -40,11 +40,6 @@ class notify_user extends \phpbb\install\task_base
*/
protected $config;
/**
* @var \phpbb\language\language
*/
protected $language;
/**
* @var \phpbb\log\log_interface
*/
@@ -80,7 +75,6 @@ class notify_user extends \phpbb\install\task_base
$this->iohandler = $iohandler;
$this->auth = $container->get('auth');
$this->language = $container->get('language');
$this->log = $container->get('log');
$this->user = $container->get('user');
$this->phpbb_root_path = $phpbb_root_path;

View File

@@ -79,7 +79,7 @@ class obtain_database_data extends \phpbb\install\task_base implements \phpbb\in
$dbhost = $this->io_handler->get_input('dbhost', '', true);
$dbport = $this->io_handler->get_input('dbport', '');
$dbuser = $this->io_handler->get_input('dbuser', '', true);
$dbpasswd = $this->io_handler->get_raw_input('dbpasswd', '', true);
$dbpasswd = $this->io_handler->get_raw_input('dbpasswd', '');
$dbname = $this->io_handler->get_input('dbname', '', true);
$table_prefix = $this->io_handler->get_input('table_prefix', '', true);

View File

@@ -126,6 +126,8 @@ class obtain_file_updater_method extends task_base
*/
protected function get_available_compression_methods()
{
$methods = [];
$methods[] = array(
'value' => '.tar',
'label' => '.tar',

View File

@@ -67,10 +67,12 @@ class obtain_update_settings extends task_base
{
if ($this->installer_config->get('disable_filesystem_update', false))
{
$options[] = array(
'value' => 'db_only',
'label' => 'UPDATE_TYPE_DB_ONLY',
'selected' => true,
$options = array(
array(
'value' => 'db_only',
'label' => 'UPDATE_TYPE_DB_ONLY',
'selected' => true,
),
);
}
else

View File

@@ -49,7 +49,7 @@ class update_files extends task_base
protected $factory;
/**
* @var file_updater_interface
* @var file_updater_interface|null
*/
protected $file_updater;
@@ -58,11 +58,6 @@ class update_files extends task_base
*/
protected $update_helper;
/**
* @var string
*/
protected $phpbb_root_path;
/**
* Constructor
*
@@ -71,15 +66,13 @@ class update_files extends task_base
* @param iohandler_interface $iohandler
* @param factory $file_updater_factory
* @param update_helper $update_helper
* @param string $phpbb_root_path
*/
public function __construct(container_factory $container, config $config, iohandler_interface $iohandler, factory $file_updater_factory, update_helper $update_helper, $phpbb_root_path)
public function __construct(container_factory $container, config $config, iohandler_interface $iohandler, factory $file_updater_factory, update_helper $update_helper)
{
$this->factory = $file_updater_factory;
$this->installer_config = $config;
$this->iohandler = $iohandler;
$this->update_helper = $update_helper;
$this->phpbb_root_path = $phpbb_root_path;
$this->cache = $container->get('cache.driver');
$this->file_updater = null;