diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2014-05-26 18:55:19 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2014-05-26 18:55:19 +0200 |
commit | a6782801e768e9aac937c6670cd22f84dfdfb726 (patch) | |
tree | c223d72ddaefe1f8eeb7ff1a7bfbeb590fea0dd9 /phpBB/phpbb/console/command | |
parent | 26674bff3999cf70840b6c15007f9c66ef4bb218 (diff) | |
parent | 93d3c517e3aac385e5ce8adb7e20592abf8b4b14 (diff) | |
download | forums-a6782801e768e9aac937c6670cd22f84dfdfb726.tar forums-a6782801e768e9aac937c6670cd22f84dfdfb726.tar.gz forums-a6782801e768e9aac937c6670cd22f84dfdfb726.tar.bz2 forums-a6782801e768e9aac937c6670cd22f84dfdfb726.tar.xz forums-a6782801e768e9aac937c6670cd22f84dfdfb726.zip |
Merge pull request #2429 from Nicofuma/ticket/12074
[ticket/12074] Managing extensions doesn't produce any log entry
* Nicofuma/ticket/12074:
[ticket/12074] Update the visibility of the constructor
[ticket/12074] Don't log errors
[ticket/12074] Managing extensions doesn't produce any log entry
Diffstat (limited to 'phpBB/phpbb/console/command')
4 files changed, 8 insertions, 1 deletions
diff --git a/phpBB/phpbb/console/command/extension/command.php b/phpBB/phpbb/console/command/extension/command.php index edde7ce2e2..72325ce768 100644 --- a/phpBB/phpbb/console/command/extension/command.php +++ b/phpBB/phpbb/console/command/extension/command.php @@ -13,9 +13,13 @@ abstract class command extends \phpbb\console\command\command /** @var \phpbb\extension\manager */ protected $manager; - function __construct(\phpbb\extension\manager $manager) + /** @var \phpbb\log\log */ + protected $log; + + public function __construct(\phpbb\extension\manager $manager, \phpbb\log\log $log) { $this->manager = $manager; + $this->log = $log; parent::__construct(); } diff --git a/phpBB/phpbb/console/command/extension/disable.php b/phpBB/phpbb/console/command/extension/disable.php index e4de70ca34..ceaf168108 100644 --- a/phpBB/phpbb/console/command/extension/disable.php +++ b/phpBB/phpbb/console/command/extension/disable.php @@ -40,6 +40,7 @@ class disable extends command } else { + $this->log->add('admin', ANONYMOUS, '', 'LOG_EXT_DISABLE', time(), array($name)); $output->writeln("<info>Successfully disabled extension $name</info>"); return 0; } diff --git a/phpBB/phpbb/console/command/extension/enable.php b/phpBB/phpbb/console/command/extension/enable.php index ee7dae76aa..757f19005e 100644 --- a/phpBB/phpbb/console/command/extension/enable.php +++ b/phpBB/phpbb/console/command/extension/enable.php @@ -35,6 +35,7 @@ class enable extends command if ($this->manager->enabled($name)) { + $this->log->add('admin', ANONYMOUS, '', 'LOG_EXTENSION_ENABLE', time(), array($name)); $output->writeln("<info>Successfully enabled extension $name</info>"); return 0; } diff --git a/phpBB/phpbb/console/command/extension/purge.php b/phpBB/phpbb/console/command/extension/purge.php index c2e1d2928c..0342d116f5 100644 --- a/phpBB/phpbb/console/command/extension/purge.php +++ b/phpBB/phpbb/console/command/extension/purge.php @@ -40,6 +40,7 @@ class purge extends command } else { + $this->log->add('admin', ANONYMOUS, '', 'LOG_EXT_PURGE', time(), array($name)); $output->writeln("<info>Successfully purge extension $name</info>"); return 0; } |