aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/console/command/db
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2014-10-24 13:33:26 -0700
committerMarc Alexander <admin@m-a-styles.de>2014-10-24 13:33:26 -0700
commitb27b9a6984f2ed3a9a186133657d30b4cca883c0 (patch)
tree2afc362e5eb9dba71b6db7930bc02767d289c93e /phpBB/phpbb/console/command/db
parent516bd9ea51a2c2b908eb1f62bddaba967559db4a (diff)
downloadforums-b27b9a6984f2ed3a9a186133657d30b4cca883c0.tar
forums-b27b9a6984f2ed3a9a186133657d30b4cca883c0.tar.gz
forums-b27b9a6984f2ed3a9a186133657d30b4cca883c0.tar.bz2
forums-b27b9a6984f2ed3a9a186133657d30b4cca883c0.tar.xz
forums-b27b9a6984f2ed3a9a186133657d30b4cca883c0.zip
[ticket/13211] Move console migrator output handler to db folder
PHPBB3-13211
Diffstat (limited to 'phpBB/phpbb/console/command/db')
-rw-r--r--phpBB/phpbb/console/command/db/console_migrator_output_handler.php69
-rw-r--r--phpBB/phpbb/console/command/db/migrate.php2
2 files changed, 1 insertions, 70 deletions
diff --git a/phpBB/phpbb/console/command/db/console_migrator_output_handler.php b/phpBB/phpbb/console/command/db/console_migrator_output_handler.php
deleted file mode 100644
index b9741a3838..0000000000
--- a/phpBB/phpbb/console/command/db/console_migrator_output_handler.php
+++ /dev/null
@@ -1,69 +0,0 @@
-<?php
-/**
-*
-* This file is part of the phpBB Forum Software package.
-*
-* @copyright (c) phpBB Limited <https://www.phpbb.com>
-* @license GNU General Public License, version 2 (GPL-2.0)
-*
-* For full copyright and license information, please see
-* the docs/CREDITS.txt file.
-*
-*/
-
-namespace phpbb\console\command\db;
-
-use phpbb\user;
-use phpbb\db\migrator_output_handler_interface;
-use Symfony\Component\Console\Output\OutputInterface;
-
-class console_migrator_output_handler implements migrator_output_handler_interface
-{
- /**
- * User object.
- *
- * @var user
- */
- private $user;
-
- /**
- * Console output object.
- *
- * @var OutputInterface
- */
- private $output;
-
- /**
- * Constructor
- *
- * @param user $user User object
- * @param OutputInterface $output Console output object
- */
- public function __construct(user $user, OutputInterface $output)
- {
- $this->user = $user;
- $this->output = $output;
- }
-
- /**
- * {@inheritdoc}
- */
- public function write($message, $verbosity)
- {
- if ($verbosity <= $this->output->getVerbosity())
- {
- $translated_message = call_user_func_array(array($this->user, 'lang'), $message);
-
- if ($verbosity === migrator_output_handler_interface::VERBOSITY_NORMAL)
- {
- $translated_message = '<info>' . $translated_message . '</info>';
- }
- else if ($verbosity === migrator_output_handler_interface::VERBOSITY_VERBOSE)
- {
- $translated_message = '<comment>' . $translated_message . '</comment>';
- }
-
- $this->output->writeln($translated_message);
- }
- }
-}
diff --git a/phpBB/phpbb/console/command/db/migrate.php b/phpBB/phpbb/console/command/db/migrate.php
index 9d4b4a0c4d..15349e1230 100644
--- a/phpBB/phpbb/console/command/db/migrate.php
+++ b/phpBB/phpbb/console/command/db/migrate.php
@@ -53,7 +53,7 @@ class migrate extends \phpbb\console\command\command
protected function execute(InputInterface $input, OutputInterface $output)
{
- $this->migrator->set_output_handler(new console_migrator_output_handler($this->user, $output));
+ $this->migrator->set_output_handler(new \phpbb\db\console_migrator_output_handler($this->user, $output));
$this->migrator->create_migrations_table();