Skip to content
Snippets Groups Projects
Commit d22cbf2d authored by Jared Hancock's avatar Jared Hancock
Browse files

Properly tag source and topic for emails

parent 4827655e
No related branches found
No related tags found
No related merge requests found
......@@ -2436,7 +2436,6 @@ class Ticket {
$form->setAnswer('priority', null, $topic->getPriorityId());
if ($autorespond)
$autorespond = $topic->autoRespond();
$source = $vars['source'] ?: 'Web';
//Auto assignment.
if (!isset($vars['staffId']) && $topic->getStaffId())
......@@ -2466,8 +2465,9 @@ class Ticket {
if (!$priority || !$priority->getIdValue())
$form->setAnswer('priority', null, $cfg->getDefaultPriorityId());
$deptId = $deptId ?: $cfg->getDefaultDeptId();
$topicId = $vars['topicId'] ?: 0;
$topicId = isset($topic) ? $topic->getId() : 0;
$ipaddress = $vars['ip'] ?: $_SERVER['REMOTE_ADDR'];
$source = $source ?: 'Web';
//We are ready son...hold on to the rails.
$number = Ticket::genRandTicketNumber();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment