[ticket/17350] Add IP Address of user during install process

Adds the IP address of the user completing the installation process
while extensions are being installed or updated. Prior to this change
the IP address field was being left blank however other logs created
during the install process for other actions does record the users IP.

PHPBB-17350
This commit is contained in:
Daniel James 2024-06-25 16:24:58 +01:00
parent 3647cf2cfe
commit 8eacbf8305
2 changed files with 2 additions and 2 deletions

View file

@ -144,7 +144,7 @@ class install_extensions extends \phpbb\install\task_base
if (isset($extensions[$ext_name]) && $extensions[$ext_name]['ext_active'])
{
// Create log
$this->log->add('admin', ANONYMOUS, '', 'LOG_EXT_ENABLE', time(), array($ext_name));
$this->log->add('admin', ANONYMOUS, $this->user->ip, 'LOG_EXT_ENABLE', time(), array($ext_name));
$this->iohandler->add_success_message(array('CLI_EXTENSION_ENABLE_SUCCESS', $ext_name));
}
else

View file

@ -174,7 +174,7 @@ class update_extensions extends task_base
if (isset($extensions[$ext_name]) && $extensions[$ext_name]['ext_active'])
{
// Create log
$this->log->add('admin', ANONYMOUS, '', 'LOG_EXT_UPDATE', time(), array($ext_name));
$this->log->add('admin', ANONYMOUS, $this->user->ip, 'LOG_EXT_UPDATE', time(), array($ext_name));
$this->iohandler->add_success_message(array('CLI_EXTENSION_UPDATE_SUCCESS', $ext_name));
}
else