From b3ddd87b7b65d5026d1bcb5e79f1753d442c94c6 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Mon, 24 Jun 2024 14:54:39 +0100 Subject: [PATCH] [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 --- .../install/module/install_finish/task/install_extensions.php | 2 +- .../install/module/update_database/task/update_extensions.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/phpbb/install/module/install_finish/task/install_extensions.php b/phpBB/phpbb/install/module/install_finish/task/install_extensions.php index 9f970de6a5..4287fa6187 100644 --- a/phpBB/phpbb/install/module/install_finish/task/install_extensions.php +++ b/phpBB/phpbb/install/module/install_finish/task/install_extensions.php @@ -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 diff --git a/phpBB/phpbb/install/module/update_database/task/update_extensions.php b/phpBB/phpbb/install/module/update_database/task/update_extensions.php index 0195b9c661..e9922068ed 100644 --- a/phpBB/phpbb/install/module/update_database/task/update_extensions.php +++ b/phpBB/phpbb/install/module/update_database/task/update_extensions.php @@ -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