From a6408bf398865d55f64f9bcc69a49d2039b6ae29 Mon Sep 17 00:00:00 2001 From: "Michael Kaufmann (d00p)" Date: Sat, 1 May 2010 14:54:09 +0000 Subject: [PATCH] - correct display of username in ticket-system, thanks to arnoldB --- admin_tickets.php | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/admin_tickets.php b/admin_tickets.php index 18e7ad6d..db70f150 100644 --- a/admin_tickets.php +++ b/admin_tickets.php @@ -106,7 +106,8 @@ if($page == 'tickets' WHERE `customerid` = "' . (int)$cid . '"'); if(isset($usr['loginname'])) { - $customer = $usr['firstname'] . " " . $usr['name'] . " (" . $usr['loginname'] . ")"; + $customer = getCorrectFullUserDetails($usr); + //$customer = $usr['firstname'] . " " . $usr['name'] . " (" . $usr['loginname'] . ")"; } else { $customer = $lng['ticket']['nonexistingcustomer']; } @@ -219,22 +220,8 @@ if($page == 'tickets' while($row_customer = $db->fetch_array($result_customers)) { - if($row_customer['company'] == '') - { - $customers.= makeoption($row_customer['name'] . ', ' . $row_customer['firstname'] . ' (' . $row_customer['loginname'] . ')', $row_customer['customerid']); - } - else - { - if($row_customer['name'] != '' - && $row_customer['firstname'] != '') - { - $customers.= makeoption($row_customer['name'] . ', ' . $row_customer['firstname'] . ' | ' . $row_customer['company'] . ' (' . $row_customer['loginname'] . ')', $row_customer['customerid']); - } - else - { - $customers.= makeoption($row_customer['company'] . ' (' . $row_customer['loginname'] . ')', $row_customer['customerid']); - } - } + $customer = getCorrectFullUserDetails($row_customer); + $customers.= makeoption($customer, $row_customer['customerid']); } $priorities = makeoption($lng['ticket']['unf_high'], '1', $settings['ticket']['default_priority']); @@ -651,7 +638,7 @@ elseif($page == 'archive' WHERE `customerid` = "' . (int)$cid . '"'); if(isset($usr['loginname'])) { - $customer = $usr['firstname'] . " " . $usr['name'] . " (" . $usr['loginname'] . ")"; + $customer = getCorrectFullUserDetails($usr); } else { $customer = $lng['ticket']['nonexistingcustomer']; } @@ -741,7 +728,8 @@ elseif($page == 'archive' while($row = $db->fetch_array($result2)) { - $customers.= makeoption($row['name'] . ', ' . $row['firstname'] . ' (' . $row['loginname'] . ')', $row['customerid']); + $customer = getCorrectFullUserDetails($row); + $customers.= makeoption($customer, $row['customerid']); } }