show customer name with su-link on ticket view for admins, and just as plaintext for customers, fixes #1045
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
@@ -326,13 +326,20 @@ if($page == 'tickets'
|
|||||||
$isclosed = 1;
|
$isclosed = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($mainticket->Get('by') == '1')
|
if ($mainticket->Get('by') == '1')
|
||||||
{
|
{
|
||||||
$by = $lng['ticket']['staff'];
|
$by = $lng['ticket']['staff'];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$by = $lng['ticket']['customer'];
|
$cid = $mainticket->Get('customer');
|
||||||
|
$usr = $db->query_first('SELECT `customerid`, `firstname`, `name`, `company`, `loginname`
|
||||||
|
FROM `' . TABLE_PANEL_CUSTOMERS . '`
|
||||||
|
WHERE `customerid` = "' . (int)$cid . '"'
|
||||||
|
);
|
||||||
|
$by = '<a href="'.$linker->getLink(array('section' => 'customers', 'page' => 'customers', 'action' => 'su', 'id' => $cid)).'" rel="external">';
|
||||||
|
$by .= getCorrectFullUserDetails($usr).'</a>';
|
||||||
|
//$by = $lng['ticket']['customer'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$subject = $mainticket->Get('subject');
|
$subject = $mainticket->Get('subject');
|
||||||
@@ -354,7 +361,14 @@ if($page == 'tickets'
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$by = $lng['ticket']['customer'];
|
$cid = $subticket->Get('customer');
|
||||||
|
$usr = $db->query_first('SELECT `customerid`, `firstname`, `name`, `company`, `loginname`
|
||||||
|
FROM `' . TABLE_PANEL_CUSTOMERS . '`
|
||||||
|
WHERE `customerid` = "' . (int)$cid . '"'
|
||||||
|
);
|
||||||
|
$by = '<a href="'.$linker->getLink(array('section' => 'customers', 'page' => 'customers', 'action' => 'su', 'id' => $cid)).'" rel="external">';
|
||||||
|
$by .= getCorrectFullUserDetails($usr).'</a>';
|
||||||
|
//$by = $lng['ticket']['customer'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$subject = $subticket->Get('subject');
|
$subject = $subticket->Get('subject');
|
||||||
@@ -816,11 +830,18 @@ elseif($page == 'archive'
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$by = $lng['ticket']['customer'];
|
$cid = $mainticket->Get('customer');
|
||||||
|
$usr = $db->query_first('SELECT `customerid`, `firstname`, `name`, `company`, `loginname`
|
||||||
|
FROM `' . TABLE_PANEL_CUSTOMERS . '`
|
||||||
|
WHERE `customerid` = "' . (int)$cid . '"'
|
||||||
|
);
|
||||||
|
$by = '<a href="'.$linker->getLink(array('section' => 'customers', 'page' => 'customers', 'action' => 'su', 'id' => $cid)).'" rel="external">';
|
||||||
|
$by .= getCorrectFullUserDetails($usr).'</a>';
|
||||||
|
//$by = $lng['ticket']['customer'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$subject = htmlentities($mainticket->Get('subject'));
|
$subject = $mainticket->Get('subject');
|
||||||
$message = htmlentities($mainticket->Get('message'));
|
$message = $mainticket->Get('message');
|
||||||
eval("\$ticket_replies.=\"" . getTemplate("tickets/tickets_tickets_main") . "\";");
|
eval("\$ticket_replies.=\"" . getTemplate("tickets/tickets_tickets_main") . "\";");
|
||||||
$result = $db->query('SELECT `name` FROM `' . TABLE_PANEL_TICKET_CATS . '`
|
$result = $db->query('SELECT `name` FROM `' . TABLE_PANEL_TICKET_CATS . '`
|
||||||
WHERE `id`="' . (int)$mainticket->Get('category') . '"');
|
WHERE `id`="' . (int)$mainticket->Get('category') . '"');
|
||||||
@@ -838,22 +859,28 @@ elseif($page == 'archive'
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$by = $lng['ticket']['customer'];
|
$cid = $subticket->Get('customer');
|
||||||
|
$usr = $db->query_first('SELECT `customerid`, `firstname`, `name`, `company`, `loginname`
|
||||||
|
FROM `' . TABLE_PANEL_CUSTOMERS . '`
|
||||||
|
WHERE `customerid` = "' . (int)$cid . '"'
|
||||||
|
);
|
||||||
|
$by = '<a href="'.$linker->getLink(array('section' => 'customers', 'page' => 'customers', 'action' => 'su', 'id' => $cid)).'" rel="external">';
|
||||||
|
$by .= getCorrectFullUserDetails($usr).'</a>';
|
||||||
|
//$by = $lng['ticket']['customer'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$subject = htmlentities($subticket->Get('subject'));
|
$subject = $subticket->Get('subject');
|
||||||
$message = htmlentities($subticket->Get('message'));
|
$message = $subticket->Get('message');
|
||||||
eval("\$ticket_replies.=\"" . getTemplate("tickets/tickets_tickets_list") . "\";");
|
eval("\$ticket_replies.=\"" . getTemplate("tickets/tickets_tickets_list") . "\";");
|
||||||
}
|
}
|
||||||
|
|
||||||
$priorities = makeoption($lng['ticket']['high'], '1', htmlentities($mainticket->Get('priority')), true, true);
|
$priorities = makeoption($lng['ticket']['high'], '1', htmlentities($mainticket->Get('priority')), true, true);
|
||||||
$priorities.= makeoption($lng['ticket']['normal'], '2', htmlentities($mainticket->Get('priority')), true, true);
|
$priorities.= makeoption($lng['ticket']['normal'], '2', htmlentities($mainticket->Get('priority')), true, true);
|
||||||
$priorities.= makeoption($lng['ticket']['low'], '3', htmlentities($mainticket->Get('priority')), true, true);
|
$priorities.= makeoption($lng['ticket']['low'], '3', htmlentities($mainticket->Get('priority')), true, true);
|
||||||
$subject = htmlentities($mainticket->Get('subject'));
|
$subject = $mainticket->Get('subject');
|
||||||
$ticket_replies_count = $db->num_rows($andere) + 1;
|
$ticket_replies_count = $db->num_rows($andere) + 1;
|
||||||
|
|
||||||
// don't forget the main-ticket!
|
// don't forget the main-ticket!
|
||||||
|
|
||||||
eval("echo \"" . getTemplate("tickets/tickets_view") . "\";");
|
eval("echo \"" . getTemplate("tickets/tickets_view") . "\";");
|
||||||
}
|
}
|
||||||
elseif($action == 'delete'
|
elseif($action == 'delete'
|
||||||
|
|||||||
@@ -340,7 +340,13 @@ elseif($page == 'tickets')
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$by = $lng['ticket']['customer'];
|
$cid = $mainticket->Get('customer');
|
||||||
|
$usr = $db->query_first('SELECT `customerid`, `firstname`, `name`, `company`, `loginname`
|
||||||
|
FROM `' . TABLE_PANEL_CUSTOMERS . '`
|
||||||
|
WHERE `customerid` = "' . (int)$cid . '"'
|
||||||
|
);
|
||||||
|
$by = getCorrectFullUserDetails($usr);
|
||||||
|
//$by = $lng['ticket']['customer'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$subject = $mainticket->Get('subject');
|
$subject = $mainticket->Get('subject');
|
||||||
@@ -362,7 +368,8 @@ elseif($page == 'tickets')
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$by = $lng['ticket']['customer'];
|
$by = getCorrectFullUserDetails($usr);
|
||||||
|
//$by = $lng['ticket']['customer'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$subject = $subticket->Get('subject');
|
$subject = $subticket->Get('subject');
|
||||||
|
|||||||
Reference in New Issue
Block a user