diff options
Diffstat (limited to 'phpBB/phpbb/console/command/db')
-rw-r--r-- | phpBB/phpbb/console/command/db/migrate.php | 6 | ||||
-rw-r--r-- | phpBB/phpbb/console/command/db/migration_command.php | 2 | ||||
-rw-r--r-- | phpBB/phpbb/console/command/db/revert.php | 24 |
3 files changed, 7 insertions, 25 deletions
diff --git a/phpBB/phpbb/console/command/db/migrate.php b/phpBB/phpbb/console/command/db/migrate.php index f2cc9142a6..4270e2d703 100644 --- a/phpBB/phpbb/console/command/db/migrate.php +++ b/phpBB/phpbb/console/command/db/migrate.php @@ -31,21 +31,21 @@ class migrate extends \phpbb\console\command\db\migration_command /** @var \phpbb\language\language */ protected $language; - function __construct(\phpbb\user $user, \phpbb\language\language $language, \phpbb\db\migrator $migrator, \phpbb\extension\manager $extension_manager, \phpbb\config\config $config, \phpbb\cache\service $cache, \phpbb\log\log $log, \phpbb\filesystem\filesystem_interface $filesystem, $phpbb_root_path) + public function __construct(\phpbb\user $user, \phpbb\language\language $language, \phpbb\db\migrator $migrator, \phpbb\extension\manager $extension_manager, \phpbb\config\config $config, \phpbb\cache\service $cache, \phpbb\log\log $log, \phpbb\filesystem\filesystem_interface $filesystem, $phpbb_root_path) { $this->language = $language; $this->log = $log; $this->filesystem = $filesystem; $this->phpbb_root_path = $phpbb_root_path; parent::__construct($user, $migrator, $extension_manager, $config, $cache); - $this->user->add_lang(array('common', 'install', 'migrator')); + $this->language->add_lang(array('common', 'install', 'migrator')); } protected function configure() { $this ->setName('db:migrate') - ->setDescription($this->user->lang('CLI_DESCRIPTION_DB_MIGRATE')) + ->setDescription($this->language->lang('CLI_DESCRIPTION_DB_MIGRATE')) ; } diff --git a/phpBB/phpbb/console/command/db/migration_command.php b/phpBB/phpbb/console/command/db/migration_command.php index b951560588..851f404fab 100644 --- a/phpBB/phpbb/console/command/db/migration_command.php +++ b/phpBB/phpbb/console/command/db/migration_command.php @@ -26,7 +26,7 @@ abstract class migration_command extends \phpbb\console\command\command /** @var \phpbb\cache\service */ protected $cache; - function __construct(\phpbb\user $user, \phpbb\db\migrator $migrator, \phpbb\extension\manager $extension_manager, \phpbb\config\config $config, \phpbb\cache\service $cache) + public function __construct(\phpbb\user $user, \phpbb\db\migrator $migrator, \phpbb\extension\manager $extension_manager, \phpbb\config\config $config, \phpbb\cache\service $cache) { $this->migrator = $migrator; $this->extension_manager = $extension_manager; diff --git a/phpBB/phpbb/console/command/db/revert.php b/phpBB/phpbb/console/command/db/revert.php index 7977afc319..3c79d8c554 100644 --- a/phpBB/phpbb/console/command/db/revert.php +++ b/phpBB/phpbb/console/command/db/revert.php @@ -18,35 +18,17 @@ use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Style\SymfonyStyle; -class revert extends \phpbb\console\command\db\migration_command +class revert extends \phpbb\console\command\db\migrate { - /** @var string phpBB root path */ - protected $phpbb_root_path; - - /** @var \phpbb\filesystem\filesystem_interface */ - protected $filesystem; - - /** @var \phpbb\language\language */ - protected $language; - - function __construct(\phpbb\user $user, \phpbb\language\language $language, \phpbb\db\migrator $migrator, \phpbb\extension\manager $extension_manager, \phpbb\config\config $config, \phpbb\cache\service $cache, \phpbb\filesystem\filesystem_interface $filesystem, $phpbb_root_path) - { - $this->filesystem = $filesystem; - $this->language = $language; - $this->phpbb_root_path = $phpbb_root_path; - parent::__construct($user, $migrator, $extension_manager, $config, $cache); - $this->user->add_lang(array('common', 'migrator')); - } - protected function configure() { $this ->setName('db:revert') - ->setDescription($this->user->lang('CLI_DESCRIPTION_DB_REVERT')) + ->setDescription($this->language->lang('CLI_DESCRIPTION_DB_REVERT')) ->addArgument( 'name', InputArgument::REQUIRED, - $this->user->lang('CLI_MIGRATION_NAME') + $this->language->lang('CLI_MIGRATION_NAME') ) ; } |