aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/console/command/db
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2014-10-25 11:55:15 -0700
committerMarc Alexander <admin@m-a-styles.de>2014-10-25 11:55:15 -0700
commit84434630065c2491cfa5e65a69b8b22d6844b6f4 (patch)
tree88eb67f07f2b139e4b3a9e811fee27c1800aa3e3 /phpBB/phpbb/console/command/db
parentb27b9a6984f2ed3a9a186133657d30b4cca883c0 (diff)
downloadforums-84434630065c2491cfa5e65a69b8b22d6844b6f4.tar
forums-84434630065c2491cfa5e65a69b8b22d6844b6f4.tar.gz
forums-84434630065c2491cfa5e65a69b8b22d6844b6f4.tar.bz2
forums-84434630065c2491cfa5e65a69b8b22d6844b6f4.tar.xz
forums-84434630065c2491cfa5e65a69b8b22d6844b6f4.zip
[ticket/13211] Also use log wrapper output handler for console migrations
PHPBB3-13211
Diffstat (limited to 'phpBB/phpbb/console/command/db')
-rw-r--r--phpBB/phpbb/console/command/db/migrate.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/phpBB/phpbb/console/command/db/migrate.php b/phpBB/phpbb/console/command/db/migrate.php
index 15349e1230..76550a8429 100644
--- a/phpBB/phpbb/console/command/db/migrate.php
+++ b/phpBB/phpbb/console/command/db/migrate.php
@@ -32,13 +32,17 @@ class migrate extends \phpbb\console\command\command
/** @var \phpbb\log\log */
protected $log;
- function __construct(\phpbb\user $user, \phpbb\db\migrator $migrator, \phpbb\extension\manager $extension_manager, \phpbb\config\config $config, \phpbb\cache\service $cache, \phpbb\log\log $log)
+ /** @var string phpBB root path */
+ protected $phpbb_root_path;
+
+ function __construct(\phpbb\user $user, \phpbb\db\migrator $migrator, \phpbb\extension\manager $extension_manager, \phpbb\config\config $config, \phpbb\cache\service $cache, \phpbb\log\log $log, $phpbb_root_path)
{
$this->migrator = $migrator;
$this->extension_manager = $extension_manager;
$this->config = $config;
$this->cache = $cache;
$this->log = $log;
+ $this->phpbb_root_path = $phpbb_root_path;
parent::__construct($user);
$this->user->add_lang(array('common', 'install', 'migrator'));
}
@@ -53,7 +57,7 @@ class migrate extends \phpbb\console\command\command
protected function execute(InputInterface $input, OutputInterface $output)
{
- $this->migrator->set_output_handler(new \phpbb\db\console_migrator_output_handler($this->user, $output));
+ $this->migrator->set_output_handler(new \phpbb\db\log_wrapper_migrator_output_handler($this->user, new \phpbb\db\console_migrator_output_handler($this->user, $output), $this->phpbb_root_path . 'store/migrations_' . time() . '.log'));
$this->migrator->create_migrations_table();