From 898afccb2580843f70bf2b3c532e9a87400de133 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Tue, 22 Dec 2009 17:17:28 +0000 Subject: [PATCH] Fix: socid error if ajax search --- htdocs/contact/fiche.php | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/htdocs/contact/fiche.php b/htdocs/contact/fiche.php index 9c9fc2f398c..6bf2a8a57ea 100644 --- a/htdocs/contact/fiche.php +++ b/htdocs/contact/fiche.php @@ -43,9 +43,9 @@ $socid=$_GET["socid"]?$_GET["socid"]:$_POST["socid"]; // If socid provided by ajax company selector if (! empty($_REQUEST['socid_id'])) { - $_GET['socid'] = $_GET['socid_id']; - $_POST['socid'] = $_POST['socid_id']; - $_REQUEST['socid'] = $_REQUEST['socid_id']; + $socid = $_GET['socid'] = $_GET['socid_id']; + $socid = $_POST['socid'] = $_POST['socid_id']; + $socid = $_REQUEST['socid'] = $_REQUEST['socid_id']; } // Security check @@ -523,18 +523,17 @@ if ($_GET["id"] && $_GET["action"] != 'edit') print ''.$langs->trans("Firstname").''.$contact->firstname.''; // Company + print ''.$langs->trans("Company").''; if ($contact->socid > 0) { $objsoc->fetch($contact->socid); - - print ''.$langs->trans("Company").''.$objsoc->getNomUrl(1).''; + print $objsoc->getNomUrl(1); } else { - print ''.$langs->trans("Company").''; print $langs->trans("ContactNotLinkedToCompany"); - print ''; } + print ''; // Civility print ''.$langs->trans("UserTitle").'';