* @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;
}
}
}
g\
h6%t yԵ0RY
1%ϼηth*[<6.U,
ɿǬM G1jHNZnĵjC+PYґ»?sɶ_{jmoV34
7݅ۃ^=%<M2RTFAH3f9Ra!BI "ͱZ;rb%pC_}RTrCyq7 ,k>L#E*A\ZCX+WZ:]t7F^(Ja=!$%²*1\U;4'6%̭w1XOْcQtE?WXebg+(.F?jC?
\fmkas5C.|t
+4kD 3bRʤ2K WWNH^\?W-{k|DeC1=$<2ɱOތ+,
F3GbJF-v)=^n|2=.&'X^6%;\|՚2|+?w7h#cxv
1eY=tkK۔- iKR+
}YaKb;CagDg>ѷ8
$6doY?RZ؈C*]m@!
ŗ١o)zWߌ@̿a(LkdU\J<!سRBdzq[%~wO +6~TŖ1hpﲓ
@h2n!!-5$V2 ^){@k.aFV#"4FaKV
.=5m`4҉cM
E!K7
>AS+N&j7y= WCz( 'ٗ,Jڀfn%0Fo'8zH`^I^a21;BK.+WWL_g]}+܅ #27.G+-Q9:e!-
QUKͩV+"?Sy/pI
Ѷ'É gES9;Pk6rwD)|!z?ݫ8JeER s