From 16f377c38a406fec5fec9c29d89d9c9b2f3a4c9b Mon Sep 17 00:00:00 2001
From: Damien <damien.burel@maarch.org>
Date: Thu, 18 Oct 2018 18:34:13 +0200
Subject: [PATCH] FEAT #8550 Format contact

---
 src/core/controllers/AutoCompleteController.php | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/core/controllers/AutoCompleteController.php b/src/core/controllers/AutoCompleteController.php
index 594de72b190..39a08251473 100644
--- a/src/core/controllers/AutoCompleteController.php
+++ b/src/core/controllers/AutoCompleteController.php
@@ -502,18 +502,18 @@ class AutoCompleteController
             if (!empty($aArgs['contact']['address_postal_code'])) {
                 $address.= $aArgs['contact']['address_postal_code'] . ' ';
             }
-            $idToDisplay = "{$aArgs['contact']['contact_firstname']} {$aArgs['contact']['contact_lastname']}";
+            $contactToDisplay = "{$aArgs['contact']['contact_firstname']} {$aArgs['contact']['contact_lastname']}";
             if (!empty($aArgs['contact']['society'])) {
-                $idToDisplay .= " ({$aArgs['contact']['society']})";
+                $contactToDisplay .= " ({$aArgs['contact']['society']})";
             }
 
             $contact = [
                 'type'          => 'contact',
                 'id'            => $aArgs['contact']['ca_id'],
-                'contact'       => "{$aArgs['contact']['contact_firstname']} {$aArgs['contact']['contact_lastname']} ({$aArgs['contact']['society']})",
+                'contact'       => $contactToDisplay,
                 'address'       => $address,
-                'idToDisplay'   => "{$idToDisplay}<br/>{$address}",
-                'otherInfo'     => "{$idToDisplay} - {$address}"
+                'idToDisplay'   => "{$contactToDisplay}<br/>{$address}",
+                'otherInfo'     => "{$contactToDisplay} - {$address}"
             ];
         }
 
-- 
GitLab