Skip to content
Snippets Groups Projects
Commit 17b43e50 authored by Peter Rotich's avatar Peter Rotich
Browse files

Merge pull request #1846 from greezybacon/issue/724


thread: Log remote IP for staff replies and notes

Reviewed-By: default avatarPeter Rotich <peter@osticket.com>
parents 88bedbde 93922335
No related branches found
No related tags found
No related merge requests found
...@@ -1823,6 +1823,9 @@ class Ticket { ...@@ -1823,6 +1823,9 @@ class Ticket {
if(!$vars['staffId'] && $thisstaff) if(!$vars['staffId'] && $thisstaff)
$vars['staffId'] = $thisstaff->getId(); $vars['staffId'] = $thisstaff->getId();
if (!$vars['ip_address'] && $_SERVER['REMOTE_ADDR'])
$vars['ip_address'] = $_SERVER['REMOTE_ADDR'];
if(!($response = $this->getThread()->addResponse($vars, $errors))) if(!($response = $this->getThread()->addResponse($vars, $errors)))
return null; return null;
...@@ -1942,6 +1945,8 @@ class Ticket { ...@@ -1942,6 +1945,8 @@ class Ticket {
}elseif($poster) { //string }elseif($poster) { //string
$vars['poster'] = $poster; $vars['poster'] = $poster;
} }
if (!$vars['ip_address'] && $_SERVER['REMOTE_ADDR'])
$vars['ip_address'] = $_SERVER['REMOTE_ADDR'];
if(!($note=$this->getThread()->addNote($vars, $errors))) if(!($note=$this->getThread()->addNote($vars, $errors)))
return null; return null;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment