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

Ticket Link: Always return a link

parent d3b0a944
No related branches found
No related tags found
No related merge requests found
......@@ -58,25 +58,21 @@ implements EmailContact, ITicketUser, TemplateVariable {
switch (strtolower($tag)) {
case 'ticket_link':
$qstr = array();
$ticket = $this->getTicket();
if ($cfg && $cfg->isAuthTokenEnabled()
&& ($ticket=$this->getTicket())) {
if (!$ticket->getThread()->getNumCollaborators()) {
$qstr['auth'] = $ticket->getAuthToken($this);
return sprintf('%s/view.php?%s',
$cfg->getBaseUrl(),
Http::build_query($qstr, false)
);
}
else {
return sprintf('%s/tickets.php?id=%s',
$cfg->getBaseUrl(),
$ticket->getId()
);
}
}
&& $ticket
&& !$ticket->getNumCollaborators()) {
$qstr['auth'] = $ticket->getAuthToken($this);
return sprintf('%s/view.php?%s',
$cfg->getBaseUrl(),
Http::build_query($qstr, false)
);
} else {
return sprintf('%s/tickets.php?id=%s',
$cfg->getBaseUrl(),
$ticket ? $ticket->getId() : 0
);
}
break;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment