From 6bd2a89efc56993331c1e6da705f3065f3867094 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Tue, 5 Nov 2013 19:10:33 +0100 Subject: [ticket/11998] Move application file to bin/phpbbcli.php PHPBB3-11998 --- phpBB/bin/phpbbcli.php | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 phpBB/bin/phpbbcli.php (limited to 'phpBB/bin/phpbbcli.php') diff --git a/phpBB/bin/phpbbcli.php b/phpBB/bin/phpbbcli.php new file mode 100644 index 0000000000..e367748fd9 --- /dev/null +++ b/phpBB/bin/phpbbcli.php @@ -0,0 +1,40 @@ +register(); +$phpbb_class_loader_ext = new \phpbb\class_loader('\\', "{$phpbb_root_path}ext/", $phpEx); +$phpbb_class_loader_ext->register(); + +$phpbb_container = phpbb_create_update_container($phpbb_root_path, $phpEx, "$phpbb_root_path/config"); + +$application = new Application('phpBB Console', PHPBB_VERSION); +foreach($phpbb_container->findTaggedServiceIds('console.command') as $id => $void) +{ + $application->add($phpbb_container->get($id)); +} +$application->run(); -- cgit v1.2.1 From 73ea5daf97bf5447b9bb2ff912cce4a9ea21c58e Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Tue, 5 Nov 2013 19:42:34 +0100 Subject: [ticket/11998] Add phpBB abstraction for application and command. PHPBB3-11998 --- phpBB/bin/phpbbcli.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'phpBB/bin/phpbbcli.php') diff --git a/phpBB/bin/phpbbcli.php b/phpBB/bin/phpbbcli.php index e367748fd9..05e2597960 100644 --- a/phpBB/bin/phpbbcli.php +++ b/phpBB/bin/phpbbcli.php @@ -7,8 +7,6 @@ * */ -use Symfony\Component\Console\Application; - if (php_sapi_name() != 'cli') { echo 'This program must be run from the command line.' . PHP_EOL; @@ -32,9 +30,6 @@ $phpbb_class_loader_ext->register(); $phpbb_container = phpbb_create_update_container($phpbb_root_path, $phpEx, "$phpbb_root_path/config"); -$application = new Application('phpBB Console', PHPBB_VERSION); -foreach($phpbb_container->findTaggedServiceIds('console.command') as $id => $void) -{ - $application->add($phpbb_container->get($id)); -} +$application = new \phpbb\console\application('phpBB Console', PHPBB_VERSION); +$application->register_container_commands($phpbb_container); $application->run(); -- cgit v1.2.1 From e567f82d721917350c012908c06149da7a124668 Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Tue, 12 Nov 2013 00:12:34 +0100 Subject: [ticket/11998] Make phpbbcli executable and add shebang PHPBB3-11998 --- phpBB/bin/phpbbcli.php | 1 + 1 file changed, 1 insertion(+) mode change 100644 => 100755 phpBB/bin/phpbbcli.php (limited to 'phpBB/bin/phpbbcli.php') diff --git a/phpBB/bin/phpbbcli.php b/phpBB/bin/phpbbcli.php old mode 100644 new mode 100755 index 05e2597960..49f4ca13e7 --- a/phpBB/bin/phpbbcli.php +++ b/phpBB/bin/phpbbcli.php @@ -1,3 +1,4 @@ +#!/usr/bin/env php Date: Fri, 2 May 2014 19:01:56 +0200 Subject: [ticket/12473] Add more compatibility to phpBB Console Application. PHPBB3-12473 --- phpBB/bin/phpbbcli.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'phpBB/bin/phpbbcli.php') diff --git a/phpBB/bin/phpbbcli.php b/phpBB/bin/phpbbcli.php index 49f4ca13e7..02d6b88943 100755 --- a/phpBB/bin/phpbbcli.php +++ b/phpBB/bin/phpbbcli.php @@ -22,6 +22,7 @@ require($phpbb_root_path . 'config.' . $phpEx); require($phpbb_root_path . 'includes/constants.' . $phpEx); require($phpbb_root_path . 'includes/functions.' . $phpEx); require($phpbb_root_path . 'includes/functions_container.' . $phpEx); +require($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx); require($phpbb_root_path . 'phpbb/class_loader.' . $phpEx); $phpbb_class_loader = new \phpbb\class_loader('phpbb\\', "{$phpbb_root_path}phpbb/", $phpEx); @@ -30,6 +31,8 @@ $phpbb_class_loader_ext = new \phpbb\class_loader('\\', "{$phpbb_root_path}ext/" $phpbb_class_loader_ext->register(); $phpbb_container = phpbb_create_update_container($phpbb_root_path, $phpEx, "$phpbb_root_path/config"); +$phpbb_container->get('request')->enable_super_globals(); +require($phpbb_root_path . 'includes/compatibility_globals.' . $phpEx); $application = new \phpbb\console\application('phpBB Console', PHPBB_VERSION); $application->register_container_commands($phpbb_container); -- cgit v1.2.1 From 06ecb62abd5b1bee7ec25094e56968e28d2a29bf Mon Sep 17 00:00:00 2001 From: Tristan Darricau Date: Tue, 6 May 2014 16:50:18 +0200 Subject: [ticket/12507] Add console command to purge the cache PHPBB3-12507 --- phpBB/bin/phpbbcli.php | 1 + 1 file changed, 1 insertion(+) (limited to 'phpBB/bin/phpbbcli.php') diff --git a/phpBB/bin/phpbbcli.php b/phpBB/bin/phpbbcli.php index 02d6b88943..a29990c3f2 100755 --- a/phpBB/bin/phpbbcli.php +++ b/phpBB/bin/phpbbcli.php @@ -33,6 +33,7 @@ $phpbb_class_loader_ext->register(); $phpbb_container = phpbb_create_update_container($phpbb_root_path, $phpEx, "$phpbb_root_path/config"); $phpbb_container->get('request')->enable_super_globals(); require($phpbb_root_path . 'includes/compatibility_globals.' . $phpEx); +require($phpbb_root_path . 'includes/functions_admin.' . $phpEx); $application = new \phpbb\console\application('phpBB Console', PHPBB_VERSION); $application->register_container_commands($phpbb_container); -- cgit v1.2.1 From 09011288b6678196d745a5611b27fa0d64c127d5 Mon Sep 17 00:00:00 2001 From: Tristan Darricau Date: Tue, 6 May 2014 17:58:31 +0200 Subject: [ticket/12507] Move the 'require' statement PHPBB3-12507 --- phpBB/bin/phpbbcli.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/bin/phpbbcli.php') diff --git a/phpBB/bin/phpbbcli.php b/phpBB/bin/phpbbcli.php index a29990c3f2..dd5c8fa774 100755 --- a/phpBB/bin/phpbbcli.php +++ b/phpBB/bin/phpbbcli.php @@ -21,6 +21,7 @@ require($phpbb_root_path . 'includes/startup.' . $phpEx); require($phpbb_root_path . 'config.' . $phpEx); require($phpbb_root_path . 'includes/constants.' . $phpEx); require($phpbb_root_path . 'includes/functions.' . $phpEx); +require($phpbb_root_path . 'includes/functions_admin.' . $phpEx); require($phpbb_root_path . 'includes/functions_container.' . $phpEx); require($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx); require($phpbb_root_path . 'phpbb/class_loader.' . $phpEx); @@ -33,7 +34,6 @@ $phpbb_class_loader_ext->register(); $phpbb_container = phpbb_create_update_container($phpbb_root_path, $phpEx, "$phpbb_root_path/config"); $phpbb_container->get('request')->enable_super_globals(); require($phpbb_root_path . 'includes/compatibility_globals.' . $phpEx); -require($phpbb_root_path . 'includes/functions_admin.' . $phpEx); $application = new \phpbb\console\application('phpBB Console', PHPBB_VERSION); $application->register_container_commands($phpbb_container); -- cgit v1.2.1 From a759704b39fc1c1353f865a633759b1369589b67 Mon Sep 17 00:00:00 2001 From: Yuriy Rusko Date: Tue, 27 May 2014 20:18:06 +0200 Subject: [ticket/12594] Remove @package tags and update file headers PHPBB3-12594 --- phpBB/bin/phpbbcli.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'phpBB/bin/phpbbcli.php') diff --git a/phpBB/bin/phpbbcli.php b/phpBB/bin/phpbbcli.php index dd5c8fa774..63c8f2230b 100755 --- a/phpBB/bin/phpbbcli.php +++ b/phpBB/bin/phpbbcli.php @@ -2,9 +2,13 @@ +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file. * */ -- cgit v1.2.1 From 5efd55a34883acad2971117d3a7faf20ecd7e08b Mon Sep 17 00:00:00 2001 From: Tristan Darricau Date: Wed, 4 Jun 2014 14:26:40 +0200 Subject: [ticket/12655] Run the shell when --shell is used PHPBB3-12655 --- phpBB/bin/phpbbcli.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'phpBB/bin/phpbbcli.php') diff --git a/phpBB/bin/phpbbcli.php b/phpBB/bin/phpbbcli.php index 63c8f2230b..8b8d8e43fd 100755 --- a/phpBB/bin/phpbbcli.php +++ b/phpBB/bin/phpbbcli.php @@ -39,6 +39,9 @@ $phpbb_container = phpbb_create_update_container($phpbb_root_path, $phpEx, "$php $phpbb_container->get('request')->enable_super_globals(); require($phpbb_root_path . 'includes/compatibility_globals.' . $phpEx); -$application = new \phpbb\console\application('phpBB Console', PHPBB_VERSION); +$user = $phpbb_container->get('user'); +$user->add_lang('acp/common'); + +$application = new \phpbb\console\application('phpBB Console', PHPBB_VERSION, $user); $application->register_container_commands($phpbb_container); $application->run(); -- cgit v1.2.1 From 78648514fa8b847cfb63cd4b5432d3fa73dd106f Mon Sep 17 00:00:00 2001 From: Tristan Darricau Date: Fri, 27 Jun 2014 20:41:16 +0200 Subject: [ticket/12775] Update phpBB/bin/phpbbcli.php PHPBB3-12775 --- phpBB/bin/phpbbcli.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'phpBB/bin/phpbbcli.php') diff --git a/phpBB/bin/phpbbcli.php b/phpBB/bin/phpbbcli.php index 8b8d8e43fd..e6b9e3ac8d 100755 --- a/phpBB/bin/phpbbcli.php +++ b/phpBB/bin/phpbbcli.php @@ -22,11 +22,9 @@ define('IN_PHPBB', true); $phpbb_root_path = __DIR__ . '/../'; $phpEx = substr(strrchr(__FILE__, '.'), 1); require($phpbb_root_path . 'includes/startup.' . $phpEx); -require($phpbb_root_path . 'config.' . $phpEx); require($phpbb_root_path . 'includes/constants.' . $phpEx); require($phpbb_root_path . 'includes/functions.' . $phpEx); require($phpbb_root_path . 'includes/functions_admin.' . $phpEx); -require($phpbb_root_path . 'includes/functions_container.' . $phpEx); require($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx); require($phpbb_root_path . 'phpbb/class_loader.' . $phpEx); @@ -35,7 +33,14 @@ $phpbb_class_loader->register(); $phpbb_class_loader_ext = new \phpbb\class_loader('\\', "{$phpbb_root_path}ext/", $phpEx); $phpbb_class_loader_ext->register(); -$phpbb_container = phpbb_create_update_container($phpbb_root_path, $phpEx, "$phpbb_root_path/config"); +$phpbb_config_php_handler = new \phpbb\config_php($phpbb_root_path, $phpEx); +extract($phpbb_config_php_handler->get_all()); + +$phpbb_container_factory = new \phpbb\di\container_factory($phpbb_config_php_handler, $phpbb_root_path, $phpEx); +$phpbb_container_factory->set_use_extensions(false); +$phpbb_container_factory->set_dump_container(false); + +$phpbb_container = $phpbb_container_factory->get_container(); $phpbb_container->get('request')->enable_super_globals(); require($phpbb_root_path . 'includes/compatibility_globals.' . $phpEx); -- cgit v1.2.1 From cefffe07771162da3dba1bbc7febc611b508e7aa Mon Sep 17 00:00:00 2001 From: Tristan Darricau Date: Fri, 27 Jun 2014 21:35:53 +0200 Subject: [ticket/12775] Load the config file before constants.php PHPBB3-12775 --- phpBB/bin/phpbbcli.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'phpBB/bin/phpbbcli.php') diff --git a/phpBB/bin/phpbbcli.php b/phpBB/bin/phpbbcli.php index e6b9e3ac8d..8baeae5b4e 100755 --- a/phpBB/bin/phpbbcli.php +++ b/phpBB/bin/phpbbcli.php @@ -22,20 +22,22 @@ define('IN_PHPBB', true); $phpbb_root_path = __DIR__ . '/../'; $phpEx = substr(strrchr(__FILE__, '.'), 1); require($phpbb_root_path . 'includes/startup.' . $phpEx); -require($phpbb_root_path . 'includes/constants.' . $phpEx); -require($phpbb_root_path . 'includes/functions.' . $phpEx); -require($phpbb_root_path . 'includes/functions_admin.' . $phpEx); -require($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx); require($phpbb_root_path . 'phpbb/class_loader.' . $phpEx); $phpbb_class_loader = new \phpbb\class_loader('phpbb\\', "{$phpbb_root_path}phpbb/", $phpEx); $phpbb_class_loader->register(); -$phpbb_class_loader_ext = new \phpbb\class_loader('\\', "{$phpbb_root_path}ext/", $phpEx); -$phpbb_class_loader_ext->register(); $phpbb_config_php_handler = new \phpbb\config_php($phpbb_root_path, $phpEx); extract($phpbb_config_php_handler->get_all()); +require($phpbb_root_path . 'includes/constants.' . $phpEx); +require($phpbb_root_path . 'includes/functions.' . $phpEx); +require($phpbb_root_path . 'includes/functions_admin.' . $phpEx); +require($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx); + +$phpbb_class_loader_ext = new \phpbb\class_loader('\\', "{$phpbb_root_path}ext/", $phpEx); +$phpbb_class_loader_ext->register(); + $phpbb_container_factory = new \phpbb\di\container_factory($phpbb_config_php_handler, $phpbb_root_path, $phpEx); $phpbb_container_factory->set_use_extensions(false); $phpbb_container_factory->set_dump_container(false); -- cgit v1.2.1 From 40937e21c58399a847d04f23423622b0e1894446 Mon Sep 17 00:00:00 2001 From: Tristan Darricau Date: Sun, 29 Jun 2014 00:29:08 +0200 Subject: [ticket/12775] Renamed to \phpbb\di\container_builder PHPBB3-12775 --- phpBB/bin/phpbbcli.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'phpBB/bin/phpbbcli.php') diff --git a/phpBB/bin/phpbbcli.php b/phpBB/bin/phpbbcli.php index 8baeae5b4e..9e9f1e27e6 100755 --- a/phpBB/bin/phpbbcli.php +++ b/phpBB/bin/phpbbcli.php @@ -38,11 +38,11 @@ require($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx); $phpbb_class_loader_ext = new \phpbb\class_loader('\\', "{$phpbb_root_path}ext/", $phpEx); $phpbb_class_loader_ext->register(); -$phpbb_container_factory = new \phpbb\di\container_factory($phpbb_config_php_handler, $phpbb_root_path, $phpEx); -$phpbb_container_factory->set_use_extensions(false); -$phpbb_container_factory->set_dump_container(false); +$phpbb_container_builder = new \phpbb\di\container_factory($phpbb_config_php_handler, $phpbb_root_path, $phpEx); +$phpbb_container_builder->set_use_extensions(false); +$phpbb_container_builder->set_dump_container(false); -$phpbb_container = $phpbb_container_factory->get_container(); +$phpbb_container = $phpbb_container_builder->get_container(); $phpbb_container->get('request')->enable_super_globals(); require($phpbb_root_path . 'includes/compatibility_globals.' . $phpEx); -- cgit v1.2.1 From 2db160ff87fa42ca6c47e580de9bc9d7e5cced49 Mon Sep 17 00:00:00 2001 From: Tristan Darricau Date: Sun, 29 Jun 2014 00:33:31 +0200 Subject: [ticket/12775] Rename config_php to config_php_file PHPBB3-12775 --- phpBB/bin/phpbbcli.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'phpBB/bin/phpbbcli.php') diff --git a/phpBB/bin/phpbbcli.php b/phpBB/bin/phpbbcli.php index 9e9f1e27e6..858158ad74 100755 --- a/phpBB/bin/phpbbcli.php +++ b/phpBB/bin/phpbbcli.php @@ -27,8 +27,8 @@ require($phpbb_root_path . 'phpbb/class_loader.' . $phpEx); $phpbb_class_loader = new \phpbb\class_loader('phpbb\\', "{$phpbb_root_path}phpbb/", $phpEx); $phpbb_class_loader->register(); -$phpbb_config_php_handler = new \phpbb\config_php($phpbb_root_path, $phpEx); -extract($phpbb_config_php_handler->get_all()); +$phpbb_config_php_file = new \phpbb\config_php_file($phpbb_root_path, $phpEx); +extract($phpbb_config_php_file->get_all()); require($phpbb_root_path . 'includes/constants.' . $phpEx); require($phpbb_root_path . 'includes/functions.' . $phpEx); @@ -38,7 +38,7 @@ require($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx); $phpbb_class_loader_ext = new \phpbb\class_loader('\\', "{$phpbb_root_path}ext/", $phpEx); $phpbb_class_loader_ext->register(); -$phpbb_container_builder = new \phpbb\di\container_factory($phpbb_config_php_handler, $phpbb_root_path, $phpEx); +$phpbb_container_builder = new \phpbb\di\container_factory($phpbb_config_php_file, $phpbb_root_path, $phpEx); $phpbb_container_builder->set_use_extensions(false); $phpbb_container_builder->set_dump_container(false); -- cgit v1.2.1 From f2e8e928c08809202b1abf5668a46e3d9e735c38 Mon Sep 17 00:00:00 2001 From: Tristan Darricau Date: Sun, 29 Jun 2014 00:35:46 +0200 Subject: [ticket/12775] Fix container_builder PHPBB3-12775 --- phpBB/bin/phpbbcli.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/bin/phpbbcli.php') diff --git a/phpBB/bin/phpbbcli.php b/phpBB/bin/phpbbcli.php index 858158ad74..c8098094a2 100755 --- a/phpBB/bin/phpbbcli.php +++ b/phpBB/bin/phpbbcli.php @@ -38,7 +38,7 @@ require($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx); $phpbb_class_loader_ext = new \phpbb\class_loader('\\', "{$phpbb_root_path}ext/", $phpEx); $phpbb_class_loader_ext->register(); -$phpbb_container_builder = new \phpbb\di\container_factory($phpbb_config_php_file, $phpbb_root_path, $phpEx); +$phpbb_container_builder = new \phpbb\di\container_builder($phpbb_config_php_file, $phpbb_root_path, $phpEx); $phpbb_container_builder->set_use_extensions(false); $phpbb_container_builder->set_dump_container(false); -- cgit v1.2.1 From 6082b5e3d3942b330d7bb2aa822d97b9038babe5 Mon Sep 17 00:00:00 2001 From: Carlo Date: Sat, 12 Jul 2014 17:48:53 +0200 Subject: [ticket/12685] We need extensions enabled PHPBB3-12685 --- phpBB/bin/phpbbcli.php | 1 - 1 file changed, 1 deletion(-) (limited to 'phpBB/bin/phpbbcli.php') diff --git a/phpBB/bin/phpbbcli.php b/phpBB/bin/phpbbcli.php index c8098094a2..4c4367b31c 100755 --- a/phpBB/bin/phpbbcli.php +++ b/phpBB/bin/phpbbcli.php @@ -39,7 +39,6 @@ $phpbb_class_loader_ext = new \phpbb\class_loader('\\', "{$phpbb_root_path}ext/" $phpbb_class_loader_ext->register(); $phpbb_container_builder = new \phpbb\di\container_builder($phpbb_config_php_file, $phpbb_root_path, $phpEx); -$phpbb_container_builder->set_use_extensions(false); $phpbb_container_builder->set_dump_container(false); $phpbb_container = $phpbb_container_builder->get_container(); -- cgit v1.2.1 From 2ec50c0ff15837489f36b014a2e36470b1672508 Mon Sep 17 00:00:00 2001 From: Carlo Date: Tue, 15 Jul 2014 00:38:07 +0200 Subject: [ticket/12685] Add --safe-mode PHPBB3-12685 --- phpBB/bin/phpbbcli.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'phpBB/bin/phpbbcli.php') diff --git a/phpBB/bin/phpbbcli.php b/phpBB/bin/phpbbcli.php index 4c4367b31c..21940d8a51 100755 --- a/phpBB/bin/phpbbcli.php +++ b/phpBB/bin/phpbbcli.php @@ -12,6 +12,8 @@ * */ +use Symfony\Component\Console\Input\ArgvInput; + if (php_sapi_name() != 'cli') { echo 'This program must be run from the command line.' . PHP_EOL; @@ -39,7 +41,15 @@ $phpbb_class_loader_ext = new \phpbb\class_loader('\\', "{$phpbb_root_path}ext/" $phpbb_class_loader_ext->register(); $phpbb_container_builder = new \phpbb\di\container_builder($phpbb_config_php_file, $phpbb_root_path, $phpEx); -$phpbb_container_builder->set_dump_container(false); +$phpbb_container_builder->set_dump_container(true); + +$input = new ArgvInput(); + +if ($input->hasParameterOption(array('--safe-mode'))) +{ + $phpbb_container_builder->set_use_extensions(false); + $phpbb_container_builder->set_dump_container(false); +} $phpbb_container = $phpbb_container_builder->get_container(); $phpbb_container->get('request')->enable_super_globals(); @@ -50,4 +60,4 @@ $user->add_lang('acp/common'); $application = new \phpbb\console\application('phpBB Console', PHPBB_VERSION, $user); $application->register_container_commands($phpbb_container); -$application->run(); +$application->run($input); -- cgit v1.2.1 From 7e6215fb7f01eeaa4798d45a1f366685693bfdcc Mon Sep 17 00:00:00 2001 From: Carlo Date: Tue, 15 Jul 2014 10:22:39 +0200 Subject: [ticket/12685] Container is dumped by default PHPBB3-12685 --- phpBB/bin/phpbbcli.php | 1 - 1 file changed, 1 deletion(-) (limited to 'phpBB/bin/phpbbcli.php') diff --git a/phpBB/bin/phpbbcli.php b/phpBB/bin/phpbbcli.php index 21940d8a51..5fac2cf8b3 100755 --- a/phpBB/bin/phpbbcli.php +++ b/phpBB/bin/phpbbcli.php @@ -41,7 +41,6 @@ $phpbb_class_loader_ext = new \phpbb\class_loader('\\', "{$phpbb_root_path}ext/" $phpbb_class_loader_ext->register(); $phpbb_container_builder = new \phpbb\di\container_builder($phpbb_config_php_file, $phpbb_root_path, $phpEx); -$phpbb_container_builder->set_dump_container(true); $input = new ArgvInput(); -- cgit v1.2.1 From 15136e4f8e36ca972f6b1b0bb7a4867967698335 Mon Sep 17 00:00:00 2001 From: Carlo Date: Tue, 15 Jul 2014 11:36:51 +0200 Subject: [ticket/12685] Inject console.command_collection instead of the container PHPBB3-12685 --- phpBB/bin/phpbbcli.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/bin/phpbbcli.php') diff --git a/phpBB/bin/phpbbcli.php b/phpBB/bin/phpbbcli.php index 5fac2cf8b3..d181a63f68 100755 --- a/phpBB/bin/phpbbcli.php +++ b/phpBB/bin/phpbbcli.php @@ -58,5 +58,5 @@ $user = $phpbb_container->get('user'); $user->add_lang('acp/common'); $application = new \phpbb\console\application('phpBB Console', PHPBB_VERSION, $user); -$application->register_container_commands($phpbb_container); +$application->register_container_commands($phpbb_container->get('console.command_collection')); $application->run($input); -- cgit v1.2.1 From 7cffedf5e310e0cde9bfd541ca835a4fedf26ef3 Mon Sep 17 00:00:00 2001 From: Carlo Date: Tue, 15 Jul 2014 16:07:52 +0200 Subject: [ticket/12685] Override getDefaultInputDefinition() PHPBB3-12685 --- phpBB/bin/phpbbcli.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/bin/phpbbcli.php') diff --git a/phpBB/bin/phpbbcli.php b/phpBB/bin/phpbbcli.php index d181a63f68..baaa22e67b 100755 --- a/phpBB/bin/phpbbcli.php +++ b/phpBB/bin/phpbbcli.php @@ -44,7 +44,7 @@ $phpbb_container_builder = new \phpbb\di\container_builder($phpbb_config_php_fil $input = new ArgvInput(); -if ($input->hasParameterOption(array('--safe-mode'))) +if ($input->getParameterOption(array('--safe-mode'))) { $phpbb_container_builder->set_use_extensions(false); $phpbb_container_builder->set_dump_container(false); -- cgit v1.2.1 From d95d6720bca4591208d34aeed3787db387ec7ebb Mon Sep 17 00:00:00 2001 From: Carlo Date: Tue, 15 Jul 2014 17:51:23 +0200 Subject: [ticket/12685] Do not dump container PHPBB3-12685 --- phpBB/bin/phpbbcli.php | 1 + 1 file changed, 1 insertion(+) (limited to 'phpBB/bin/phpbbcli.php') diff --git a/phpBB/bin/phpbbcli.php b/phpBB/bin/phpbbcli.php index baaa22e67b..511eca9082 100755 --- a/phpBB/bin/phpbbcli.php +++ b/phpBB/bin/phpbbcli.php @@ -41,6 +41,7 @@ $phpbb_class_loader_ext = new \phpbb\class_loader('\\', "{$phpbb_root_path}ext/" $phpbb_class_loader_ext->register(); $phpbb_container_builder = new \phpbb\di\container_builder($phpbb_config_php_file, $phpbb_root_path, $phpEx); +$phpbb_container_builder->set_dump_container(false); $input = new ArgvInput(); -- cgit v1.2.1 From a4972bb338f06c6b7fbeea22869b3c3b106becf7 Mon Sep 17 00:00:00 2001 From: Carlo Date: Tue, 15 Jul 2014 19:21:41 +0200 Subject: [ticket/12685] Replace getParameterOption with hasParameterOption PHPBB3-12685 --- phpBB/bin/phpbbcli.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/bin/phpbbcli.php') diff --git a/phpBB/bin/phpbbcli.php b/phpBB/bin/phpbbcli.php index 511eca9082..d86ec6d8f8 100755 --- a/phpBB/bin/phpbbcli.php +++ b/phpBB/bin/phpbbcli.php @@ -45,7 +45,7 @@ $phpbb_container_builder->set_dump_container(false); $input = new ArgvInput(); -if ($input->getParameterOption(array('--safe-mode'))) +if ($input->hasParameterOption(array('--safe-mode'))) { $phpbb_container_builder->set_use_extensions(false); $phpbb_container_builder->set_dump_container(false); -- cgit v1.2.1 From 7f4d4250066eadb6badd43c4ce1b8f2f84e083cf Mon Sep 17 00:00:00 2001 From: Carlo Date: Thu, 17 Jul 2014 00:05:33 +0200 Subject: [ticket/12685] Setup class loader for extensions only if not in safe mode PHPBB3-12685 --- phpBB/bin/phpbbcli.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'phpBB/bin/phpbbcli.php') diff --git a/phpBB/bin/phpbbcli.php b/phpBB/bin/phpbbcli.php index d86ec6d8f8..89bad94184 100755 --- a/phpBB/bin/phpbbcli.php +++ b/phpBB/bin/phpbbcli.php @@ -37,9 +37,6 @@ require($phpbb_root_path . 'includes/functions.' . $phpEx); require($phpbb_root_path . 'includes/functions_admin.' . $phpEx); require($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx); -$phpbb_class_loader_ext = new \phpbb\class_loader('\\', "{$phpbb_root_path}ext/", $phpEx); -$phpbb_class_loader_ext->register(); - $phpbb_container_builder = new \phpbb\di\container_builder($phpbb_config_php_file, $phpbb_root_path, $phpEx); $phpbb_container_builder->set_dump_container(false); @@ -50,6 +47,12 @@ if ($input->hasParameterOption(array('--safe-mode'))) $phpbb_container_builder->set_use_extensions(false); $phpbb_container_builder->set_dump_container(false); } +else +{ + $phpbb_class_loader_ext = new \phpbb\class_loader('\\', "{$phpbb_root_path}ext/", $phpEx); + $phpbb_class_loader_ext->register(); + phpbb_load_extensions_autoloaders($phpbb_root_path); +} $phpbb_container = $phpbb_container_builder->get_container(); $phpbb_container->get('request')->enable_super_globals(); -- cgit v1.2.1 From f784510494b3958f997d7777aac3bc6378809432 Mon Sep 17 00:00:00 2001 From: Carlo Date: Thu, 17 Jul 2014 01:16:04 +0200 Subject: [ticket/12663] Extract CLI language string into their own file PHPBB3-12663 --- phpBB/bin/phpbbcli.php | 1 + 1 file changed, 1 insertion(+) (limited to 'phpBB/bin/phpbbcli.php') diff --git a/phpBB/bin/phpbbcli.php b/phpBB/bin/phpbbcli.php index 89bad94184..2d1a16b05d 100755 --- a/phpBB/bin/phpbbcli.php +++ b/phpBB/bin/phpbbcli.php @@ -60,6 +60,7 @@ require($phpbb_root_path . 'includes/compatibility_globals.' . $phpEx); $user = $phpbb_container->get('user'); $user->add_lang('acp/common'); +$user->add_lang('acp/cli'); $application = new \phpbb\console\application('phpBB Console', PHPBB_VERSION, $user); $application->register_container_commands($phpbb_container->get('console.command_collection')); -- cgit v1.2.1 From e78a6046ca8f90e11527590ecd9c4ce0c8ecbe18 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Thu, 17 Jul 2014 16:54:42 +0200 Subject: [ticket/12663] Have cli.php language file at top level; unrelated to ACP. PHPBB3-12663 --- phpBB/bin/phpbbcli.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/bin/phpbbcli.php') diff --git a/phpBB/bin/phpbbcli.php b/phpBB/bin/phpbbcli.php index 2d1a16b05d..ca425ad0c4 100755 --- a/phpBB/bin/phpbbcli.php +++ b/phpBB/bin/phpbbcli.php @@ -60,7 +60,7 @@ require($phpbb_root_path . 'includes/compatibility_globals.' . $phpEx); $user = $phpbb_container->get('user'); $user->add_lang('acp/common'); -$user->add_lang('acp/cli'); +$user->add_lang('cli'); $application = new \phpbb\console\application('phpBB Console', PHPBB_VERSION, $user); $application->register_container_commands($phpbb_container->get('console.command_collection')); -- cgit v1.2.1 From d045822cd8cc2220a2ad3e159e3b688cb4049c12 Mon Sep 17 00:00:00 2001 From: Oliver Schramm Date: Wed, 13 Jan 2016 18:11:43 +0100 Subject: [ticket/14403] Set a default user id and ip in CLI PHPBB3-14403 --- phpBB/bin/phpbbcli.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'phpBB/bin/phpbbcli.php') diff --git a/phpBB/bin/phpbbcli.php b/phpBB/bin/phpbbcli.php index ca425ad0c4..239dd3932b 100755 --- a/phpBB/bin/phpbbcli.php +++ b/phpBB/bin/phpbbcli.php @@ -59,6 +59,8 @@ $phpbb_container->get('request')->enable_super_globals(); require($phpbb_root_path . 'includes/compatibility_globals.' . $phpEx); $user = $phpbb_container->get('user'); +$user->data['user_id'] = ANONYMOUS; +$user->ip = '127.0.0.1'; $user->add_lang('acp/common'); $user->add_lang('cli'); -- cgit v1.2.1