diff options
Diffstat (limited to 'phpBB/phpbb/console/command/config')
| -rw-r--r-- | phpBB/phpbb/console/command/config/command.php | 4 | ||||
| -rw-r--r-- | phpBB/phpbb/console/command/config/delete.php | 8 | ||||
| -rw-r--r-- | phpBB/phpbb/console/command/config/get.php | 8 | ||||
| -rw-r--r-- | phpBB/phpbb/console/command/config/increment.php | 10 | ||||
| -rw-r--r-- | phpBB/phpbb/console/command/config/set.php | 10 | ||||
| -rw-r--r-- | phpBB/phpbb/console/command/config/set_atomic.php | 14 | 
6 files changed, 27 insertions, 27 deletions
| diff --git a/phpBB/phpbb/console/command/config/command.php b/phpBB/phpbb/console/command/config/command.php index de3fbd7fa7..f0ad5d4d19 100644 --- a/phpBB/phpbb/console/command/config/command.php +++ b/phpBB/phpbb/console/command/config/command.php @@ -17,10 +17,10 @@ abstract class command extends \phpbb\console\command\command  	/** @var \phpbb\config\config */  	protected $config; -	function __construct(\phpbb\config\config $config) +	function __construct(\phpbb\user $user, \phpbb\config\config $config)  	{  		$this->config = $config; -		parent::__construct(); +		parent::__construct($user);  	}  } diff --git a/phpBB/phpbb/console/command/config/delete.php b/phpBB/phpbb/console/command/config/delete.php index 1310bb18b4..efd276d7e3 100644 --- a/phpBB/phpbb/console/command/config/delete.php +++ b/phpBB/phpbb/console/command/config/delete.php @@ -25,11 +25,11 @@ class delete extends command  	{  		$this  			->setName('config:delete') -			->setDescription('Deletes a configuration option') +			->setDescription($this->user->lang('CLI_DESCRIPTION_DELETE_CONFIG'))  			->addArgument(  				'key',  				InputArgument::REQUIRED, -				"The configuration option's name" +				$this->user->lang('CLI_CONFIG_OPTION_NAME')  			)  		;  	} @@ -53,11 +53,11 @@ class delete extends command  		{  			$this->config->delete($key); -			$output->writeln("<info>Successfully deleted config $key</info>"); +			$output->writeln('<info>' . $this->user->lang('CLI_CONFIG_DELETE_SUCCESS', $key) . '</info>');  		}  		else  		{ -			$output->writeln("<error>Config $key does not exist</error>"); +			$output->writeln('<error>' . $this->user->lang('CLI_CONFIG_NOT_EXISTS', $key) . '</error>');  		}  	}  } diff --git a/phpBB/phpbb/console/command/config/get.php b/phpBB/phpbb/console/command/config/get.php index ee8c65110e..9c03b49a3d 100644 --- a/phpBB/phpbb/console/command/config/get.php +++ b/phpBB/phpbb/console/command/config/get.php @@ -26,17 +26,17 @@ class get extends command  	{  		$this  			->setName('config:get') -			->setDescription("Gets a configuration option's value") +			->setDescription($this->user->lang('CLI_DESCRIPTION_GET_CONFIG'))  			->addArgument(  				'key',  				InputArgument::REQUIRED, -				"The configuration option's name" +				$this->user->lang('CLI_CONFIG_OPTION_NAME')  			)  			->addOption(  				'no-newline',  				null,  				InputOption::VALUE_NONE, -				'Set this option if the value should be printed without a new line at the end.' +				$this->user->lang('CLI_CONFIG_PRINT_WITHOUT_NEWLINE')  			)  		;  	} @@ -66,7 +66,7 @@ class get extends command  		}  		else  		{ -			$output->writeln("<error>Could not get config $key</error>"); +			$output->writeln('<error>' . $this->user->lang('CLI_CONFIG_NOT_EXISTS', $key) . '</error>');  		}  	}  } diff --git a/phpBB/phpbb/console/command/config/increment.php b/phpBB/phpbb/console/command/config/increment.php index 21f0660e61..0c25075ce8 100644 --- a/phpBB/phpbb/console/command/config/increment.php +++ b/phpBB/phpbb/console/command/config/increment.php @@ -26,22 +26,22 @@ class increment extends command  	{  		$this  			->setName('config:increment') -			->setDescription("Increments a configuration option's value") +			->setDescription($this->user->lang('CLI_DESCRIPTION_INCREMENT_CONFIG'))  			->addArgument(  				'key',  				InputArgument::REQUIRED, -				"The configuration option's name" +				$this->user->lang('CLI_CONFIG_OPTION_NAME')  			)  			->addArgument(  				'increment',  				InputArgument::REQUIRED, -				'Amount to increment by' +				$this->user->lang('CLI_CONFIG_INCREMENT_BY')  			)  			->addOption(  				'dynamic',  				'd',  				InputOption::VALUE_NONE, -				'Set this option if the configuration option changes too frequently to be efficiently cached.' +				$this->user-lang('CLI_CONFIG_CANNOT_CACHED')  			)  		;  	} @@ -65,6 +65,6 @@ class increment extends command  		$this->config->increment($key, $increment, $use_cache); -		$output->writeln("<info>Successfully incremented config $key</info>"); +		$output->writeln('<info>' . $this->user->lang('CLI_CONFIG_INCREMENT_SUCCESS', $key) . '</info>');  	}  } diff --git a/phpBB/phpbb/console/command/config/set.php b/phpBB/phpbb/console/command/config/set.php index 587b7fb0de..695de31013 100644 --- a/phpBB/phpbb/console/command/config/set.php +++ b/phpBB/phpbb/console/command/config/set.php @@ -26,22 +26,22 @@ class set extends command  	{  		$this  			->setName('config:set') -			->setDescription("Sets a configuration option's value") +			->setDescription($this->user->lang('CLI_DESCRIPTION_SET_CONFIG'))  			->addArgument(  				'key',  				InputArgument::REQUIRED, -				"The configuration option's name" +				$this->user->lang('CLI_CONFIG_OPTION_NAME')  			)  			->addArgument(  				'value',  				InputArgument::REQUIRED, -				'New configuration value, use 0 and 1 to specify boolean values' +				$this->user->lang('CLI_CONFIG_NEW')  			)  			->addOption(  				'dynamic',  				'd',  				InputOption::VALUE_NONE, -				'Set this option if the configuration option changes too frequently to be efficiently cached.' +				$this->user->lang('CLI_CONFIG_CANNOT_CACHED')  			)  		;  	} @@ -65,6 +65,6 @@ class set extends command  		$this->config->set($key, $value, $use_cache); -		$output->writeln("<info>Successfully set config $key</info>"); +		$output->writeln('<info>' . $this->user->lang('CLI_CONFIG_SET_SUCCESS', $key) . '</info>');  	}  } diff --git a/phpBB/phpbb/console/command/config/set_atomic.php b/phpBB/phpbb/console/command/config/set_atomic.php index a7a52155f9..e8c69a0885 100644 --- a/phpBB/phpbb/console/command/config/set_atomic.php +++ b/phpBB/phpbb/console/command/config/set_atomic.php @@ -26,27 +26,27 @@ class set_atomic extends command  	{  		$this  			->setName('config:set-atomic') -			->setDescription("Sets a configuration option's value only if the old matches the current value.") +			->setDescription($this->user->lang('CLI_DESCRIPTION_SET_ATOMIC_CONFIG'))  			->addArgument(  				'key',  				InputArgument::REQUIRED, -				"The configuration option's name" +				$this->user->lang('CLI_CONFIG_OPTION_NAME')  			)  			->addArgument(  				'old',  				InputArgument::REQUIRED, -				'Current configuration value, use 0 and 1 to specify boolean values' +				$this->user->lang('CLI_CONFIG_CURRENT')  			)  			->addArgument(  				'new',  				InputArgument::REQUIRED, -				'New configuration value, use 0 and 1 to specify boolean values' +				$this->user->lang('CLI_CONFIG_NEW')  			)  			->addOption(  				'dynamic',  				'd',  				InputOption::VALUE_NONE, -				'Set this option if the configuration option changes too frequently to be efficiently cached.' +				$this->user->lang('CLI_CONFIG_CANNOT_CACHED')  			)  		;  	} @@ -72,12 +72,12 @@ class set_atomic extends command  		if ($this->config->set_atomic($key, $old_value, $new_value, $use_cache))  		{ -			$output->writeln("<info>Successfully set config $key</info>"); +			$output->writeln('<info>' . $this->user->lang('CLI_CONFIG_SET_SUCCESS', $key) . '</info>');  			return 0;  		}  		else  		{ -			$output->writeln("<error>Could not set config $key</error>"); +			$output->writeln('<error>' . $this->user->lang('CLI_CONFIG_SET_FAILURE', $key) . '</error>');  			return 1;  		}  	} | 
