mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[ticket/14281] Fix installer CLI after recent changes
PHPBB3-14281
This commit is contained in:
parent
024ec86181
commit
079b3d074d
4 changed files with 9 additions and 3 deletions
4
phpBB/install/phpbbcli.php
Normal file → Executable file
4
phpBB/install/phpbbcli.php
Normal file → Executable file
|
@ -12,6 +12,8 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
use Symfony\Component\Console\Input\ArgvInput;
|
||||||
|
|
||||||
if (php_sapi_name() !== 'cli')
|
if (php_sapi_name() !== 'cli')
|
||||||
{
|
{
|
||||||
echo 'This program must be run from the command line.' . PHP_EOL;
|
echo 'This program must be run from the command line.' . PHP_EOL;
|
||||||
|
@ -31,6 +33,8 @@ $startup_new_path = $phpbb_root_path . 'install/update/update/new/install/startu
|
||||||
$startup_path = (file_exists($startup_new_path)) ? $startup_new_path : $phpbb_root_path . 'install/startup.' . $phpEx;
|
$startup_path = (file_exists($startup_new_path)) ? $startup_new_path : $phpbb_root_path . 'install/startup.' . $phpEx;
|
||||||
require($startup_path);
|
require($startup_path);
|
||||||
|
|
||||||
|
$input = new ArgvInput();
|
||||||
|
|
||||||
/** @var \phpbb\filesystem\filesystem $phpbb_filesystem */
|
/** @var \phpbb\filesystem\filesystem $phpbb_filesystem */
|
||||||
$phpbb_filesystem = $phpbb_installer_container->get('filesystem');
|
$phpbb_filesystem = $phpbb_installer_container->get('filesystem');
|
||||||
|
|
||||||
|
|
|
@ -312,6 +312,8 @@ $lang = array_merge($lang, array(
|
||||||
'CLI_INSTALL_SHOW_CONFIG' => 'Show the configuration which will be used',
|
'CLI_INSTALL_SHOW_CONFIG' => 'Show the configuration which will be used',
|
||||||
'CLI_INSTALL_VALIDATE_CONFIG' => 'Validate a configuration file',
|
'CLI_INSTALL_VALIDATE_CONFIG' => 'Validate a configuration file',
|
||||||
'CLI_CONFIG_FILE' => 'Config file to use',
|
'CLI_CONFIG_FILE' => 'Config file to use',
|
||||||
|
'MISSING_FILE' => 'Unable to access file %1$s',
|
||||||
|
'INVALID_YAML_FILE' => 'Could not parse YAML file %1$s',
|
||||||
));
|
));
|
||||||
|
|
||||||
// Common updater messages
|
// Common updater messages
|
||||||
|
|
|
@ -96,7 +96,7 @@ class show extends \phpbb\console\command\command
|
||||||
|
|
||||||
if (!is_file($config_file))
|
if (!is_file($config_file))
|
||||||
{
|
{
|
||||||
$iohandler->add_error_message(array('MISSING_FILE', array($config_file)));
|
$iohandler->add_error_message('MISSING_FILE', array($config_file));
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -116,7 +116,7 @@ class install extends \phpbb\console\command\command
|
||||||
|
|
||||||
if (!is_file($config_file))
|
if (!is_file($config_file))
|
||||||
{
|
{
|
||||||
$iohandler->add_error_message(array('MISSING_FILE', array($config_file)));
|
$iohandler->add_error_message(array('MISSING_FILE', $config_file));
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -127,7 +127,7 @@ class install extends \phpbb\console\command\command
|
||||||
}
|
}
|
||||||
catch (ParseException $e)
|
catch (ParseException $e)
|
||||||
{
|
{
|
||||||
$iohandler->add_error_message('INVALID_YAML_FILE');
|
$iohandler->add_error_message(array('INVALID_YAML_FILE', $config_file));
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue