Skip to content
Snippets Groups Projects
Unverified Commit 14b5ba57 authored by Peter Rotich's avatar Peter Rotich Committed by GitHub
Browse files

Merge pull request #4575 from JediKev/issue/ticket_link-fatal-error

issue: ticket_link Fatal Error
parents a5f10a0d 2062950b
Branches
Tags
No related merge requests found
...@@ -59,19 +59,20 @@ implements EmailContact, ITicketUser, TemplateVariable { ...@@ -59,19 +59,20 @@ implements EmailContact, ITicketUser, TemplateVariable {
case 'ticket_link': case 'ticket_link':
$qstr = array(); $qstr = array();
if ($cfg && $cfg->isAuthTokenEnabled() if ($cfg && $cfg->isAuthTokenEnabled()
&& ($ticket=$this->getTicket()) && ($ticket=$this->getTicket())) {
&& !$ticket->getThread()->getNumCollaborators()) { if (!$ticket->getThread()->getNumCollaborators()) {
$qstr['auth'] = $ticket->getAuthToken($this); $qstr['auth'] = $ticket->getAuthToken($this);
return sprintf('%s/view.php?%s', return sprintf('%s/view.php?%s',
$cfg->getBaseUrl(), $cfg->getBaseUrl(),
Http::build_query($qstr, false) Http::build_query($qstr, false)
); );
} }
else { else {
return sprintf('%s/tickets.php?id=%s', return sprintf('%s/tickets.php?id=%s',
$cfg->getBaseUrl(), $cfg->getBaseUrl(),
$ticket->getId() $ticket->getId()
); );
}
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment