* @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\extension;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
class enable extends command
{
protected function configure()
{
$this
->setName('extension:enable')
->setDescription($this->user->lang('CLI_DESCRIPTION_ENABLE_EXTENSION'))
->addArgument(
'extension-name',
InputArgument::REQUIRED,
$this->user->lang('CLI_EXTENSION_NAME')
)
;
}
protected function execute(InputInterface $input, OutputInterface $output)
{
$name = $input->getArgument('extension-name');
$this->manager->enable($name);
$this->manager->load_extensions();
if ($this->manager->is_enabled($name))
{
$this->log->add('admin', ANONYMOUS, '', 'LOG_EXT_ENABLE', time(), array($name));
$output->writeln('' . $this->user->lang('CLI_EXTENSION_ENABLE_SUCCESS', $name) . '');
return 0;
}
else
{
$output->writeln('' . $this->user->lang('CLI_EXTENSION_ENABLE_FAILURE', $name) . '');
return 1;
}
}
}
-4G]mvX0ʠ42a;Kti#HYl5{n\̉LMUQ+1ʓp#sJ4I;^_%F)WzuX9y#口c=S˰/:YB>ڭGeP}0{JV
̓6謎祩
QCL5;=sA&~)r!{v$bQe>i_X4ihq\SCG;(Kɡ?snFɃ$ة%zHqbuw24Da
F 5, 7@F|j%RJJsnT]0( 5z
tԆfMȭ_mew0*W)EztC+p>u>hI&Gొ밁eAewsinT;JIьIi ؑsCŰf&IwJ
Sf';\o4#%[Ռk⻒K^SxkEDrm5㾘E_5ա%:e/JSa{t$}`2E-yxJn"ne+=Ҙ[~=0YA-ċ½q\0| Te*ɏP!u<u/ާn?̓g2fCw"zX*c,Wv"7?4ke\ů\Qn ؠFWL-BՆ'[FƊ$BT0ڪN$ ceG.tla(m%r_7/3-]F%St>Ww?,}H,=aҴ
uwȚSGi"H