From 7e1e28f0d8ee87235122e412bfe69f6cb6f323b5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 9 Feb 2011 18:27:56 +0000 Subject: [PATCH] Fix: Wrong order of name/firstname --- htdocs/comm/propal/contact.php | 25 +++++++++++++++---------- htdocs/commande/contact.php | 25 +++++++++++++++---------- htdocs/compta/facture/contact.php | 21 +++++++++++++-------- htdocs/contrat/contact.php | 21 +++++++++++++-------- htdocs/fichinter/contact.php | 25 +++++++++++++++---------- htdocs/fourn/commande/contact.php | 25 +++++++++++++++---------- htdocs/fourn/facture/contact.php | 21 +++++++++++++-------- htdocs/projet/contact.php | 13 ++++++++----- htdocs/projet/tasks/contact.php | 25 +++++++++++++++---------- 9 files changed, 122 insertions(+), 79 deletions(-) diff --git a/htdocs/comm/propal/contact.php b/htdocs/comm/propal/contact.php index 77180a4d22f..38bb0e86d7c 100644 --- a/htdocs/comm/propal/contact.php +++ b/htdocs/comm/propal/contact.php @@ -153,6 +153,7 @@ llxHeader('', $langs->trans("Proposal"), "Propal"); $html = new Form($db); $formcompany= new FormCompany($db); $contactstatic=new Contact($db); +$userstatic=new User($db); /* *************************************************************************** */ @@ -350,16 +351,20 @@ if ($id > 0 || ! empty($ref)) // Contact print ''; - if ($tab[$i]['source']=='internal') - { - print ''; - print img_object($langs->trans("ShowUser"),"user").' '.$tab[$i]['nom'].''; - } - if ($tab[$i]['source']=='external') - { - print ''; - print img_object($langs->trans("ShowContact"),"contact").' '.$tab[$i]['nom'].''; - } + if ($tab[$i]['source']=='internal') + { + $userstatic->id=$tab[$i]['id']; + $userstatic->nom=$tab[$i]['nom']; + $userstatic->prenom=$tab[$i]['firstname']; + print $userstatic->getNomUrl(1); + } + if ($tab[$i]['source']=='external') + { + $contactstatic->id=$tab[$i]['id']; + $contactstatic->name=$tab[$i]['nom']; + $contactstatic->firstname=$tab[$i]['firstname']; + print $contactstatic->getNomUrl(1); + } print ''; // Type de contact diff --git a/htdocs/commande/contact.php b/htdocs/commande/contact.php index 2dfbf8c829e..694ec32cfab 100644 --- a/htdocs/commande/contact.php +++ b/htdocs/commande/contact.php @@ -154,6 +154,7 @@ llxHeader('',$langs->trans('Order'),'EN:Customers_Orders|FR:Commandes_Clients|ES $html = new Form($db); $formcompany = new FormCompany($db); $contactstatic=new Contact($db); +$userstatic=new User($db); /* *************************************************************************** */ @@ -347,16 +348,20 @@ if ($id > 0 || ! empty($ref)) // Contact print ''; - if ($tab[$i]['source']=='internal') - { - print ''; - print img_object($langs->trans("ShowUser"),"user").' '.$tab[$i]['nom'].''; - } - if ($tab[$i]['source']=='external') - { - print ''; - print img_object($langs->trans("ShowContact"),"contact").' '.$tab[$i]['nom'].''; - } + if ($tab[$i]['source']=='internal') + { + $userstatic->id=$tab[$i]['id']; + $userstatic->nom=$tab[$i]['nom']; + $userstatic->prenom=$tab[$i]['firstname']; + print $userstatic->getNomUrl(1); + } + if ($tab[$i]['source']=='external') + { + $contactstatic->id=$tab[$i]['id']; + $contactstatic->name=$tab[$i]['nom']; + $contactstatic->firstname=$tab[$i]['firstname']; + print $contactstatic->getNomUrl(1); + } print ''; // Type de contact diff --git a/htdocs/compta/facture/contact.php b/htdocs/compta/facture/contact.php index c4920758aab..ddd812313ca 100644 --- a/htdocs/compta/facture/contact.php +++ b/htdocs/compta/facture/contact.php @@ -152,6 +152,7 @@ llxHeader('', $langs->trans("Bill"), "Facture"); $html = new Form($db); $formcompany = new FormCompany($db); $contactstatic=new Contact($db); +$userstatic=new User($db); /* *************************************************************************** */ @@ -342,15 +343,19 @@ if ($id > 0 || ! empty($ref)) // Contact print ''; - if ($tab[$i]['source']=='internal') - { - print ''; - print img_object($langs->trans("ShowUser"),"user").' '.$tab[$i]['nom'].''; + if ($tab[$i]['source']=='internal') + { + $userstatic->id=$tab[$i]['id']; + $userstatic->nom=$tab[$i]['nom']; + $userstatic->prenom=$tab[$i]['firstname']; + print $userstatic->getNomUrl(1); } - if ($tab[$i]['source']=='external') - { - print ''; - print img_object($langs->trans("ShowContact"),"contact").' '.$tab[$i]['nom'].''; + if ($tab[$i]['source']=='external') + { + $contactstatic->id=$tab[$i]['id']; + $contactstatic->name=$tab[$i]['nom']; + $contactstatic->firstname=$tab[$i]['firstname']; + print $contactstatic->getNomUrl(1); } print ''; diff --git a/htdocs/contrat/contact.php b/htdocs/contrat/contact.php index 21406d8c727..0a427cfd24c 100644 --- a/htdocs/contrat/contact.php +++ b/htdocs/contrat/contact.php @@ -153,6 +153,7 @@ llxHeader('', $langs->trans("ContractCard"), "Contrat"); $html = new Form($db); $formcompany= new FormCompany($db); $contactstatic=new Contact($db); +$userstatic=new User($db); /* *************************************************************************** */ @@ -346,15 +347,19 @@ if ($id > 0) // Contact print ''; - if ($tab[$i]['source']=='internal') - { - print ''; - print img_object($langs->trans("ShowUser"),"user").' '.$tab[$i]['nom'].''; + if ($tab[$i]['source']=='internal') + { + $userstatic->id=$tab[$i]['id']; + $userstatic->nom=$tab[$i]['nom']; + $userstatic->prenom=$tab[$i]['firstname']; + print $userstatic->getNomUrl(1); } - if ($tab[$i]['source']=='external') - { - print ''; - print img_object($langs->trans("ShowContact"),"contact").' '.$tab[$i]['nom'].''; + if ($tab[$i]['source']=='external') + { + $contactstatic->id=$tab[$i]['id']; + $contactstatic->name=$tab[$i]['nom']; + $contactstatic->firstname=$tab[$i]['firstname']; + print $contactstatic->getNomUrl(1); } print ''; diff --git a/htdocs/fichinter/contact.php b/htdocs/fichinter/contact.php index cae85a04470..1f420d9bd16 100644 --- a/htdocs/fichinter/contact.php +++ b/htdocs/fichinter/contact.php @@ -152,6 +152,7 @@ llxHeader(); $html = new Form($db); $formcompany = new FormCompany($db); $contactstatic=new Contact($db); +$userstatic=new User($db); /* *************************************************************************** */ @@ -332,16 +333,20 @@ if ($id > 0) // Contact print ''; - if ($tab[$i]['source']=='internal') - { - print ''; - print img_object($langs->trans("ShowUser"),"user").' '.$tab[$i]['nom'].''; - } - if ($tab[$i]['source']=='external') - { - print ''; - print img_object($langs->trans("ShowContact"),"contact").' '.$tab[$i]['nom'].''; - } + if ($tab[$i]['source']=='internal') + { + $userstatic->id=$tab[$i]['id']; + $userstatic->nom=$tab[$i]['nom']; + $userstatic->prenom=$tab[$i]['firstname']; + print $userstatic->getNomUrl(1); + } + if ($tab[$i]['source']=='external') + { + $contactstatic->id=$tab[$i]['id']; + $contactstatic->name=$tab[$i]['nom']; + $contactstatic->firstname=$tab[$i]['firstname']; + print $contactstatic->getNomUrl(1); + } print ''; // Type de contact diff --git a/htdocs/fourn/commande/contact.php b/htdocs/fourn/commande/contact.php index b7e4138476c..495044dd350 100644 --- a/htdocs/fourn/commande/contact.php +++ b/htdocs/fourn/commande/contact.php @@ -154,6 +154,7 @@ llxHeader('', $langs->trans("Order"), "Commande"); $html = new Form($db); $formcompany = new FormCompany($db); $contactstatic=new Contact($db); +$userstatic=new User($db); /* *************************************************************************** */ @@ -339,16 +340,20 @@ if ($id > 0 || ! empty($ref)) // Contact print ''; - if ($tab[$i]['source']=='internal') - { - print ''; - print img_object($langs->trans("ShowUser"),"user").' '.$tab[$i]['nom'].''; - } - if ($tab[$i]['source']=='external') - { - print ''; - print img_object($langs->trans("ShowContact"),"contact").' '.$tab[$i]['nom'].''; - } + if ($tab[$i]['source']=='internal') + { + $userstatic->id=$tab[$i]['id']; + $userstatic->nom=$tab[$i]['nom']; + $userstatic->prenom=$tab[$i]['firstname']; + print $userstatic->getNomUrl(1); + } + if ($tab[$i]['source']=='external') + { + $contactstatic->id=$tab[$i]['id']; + $contactstatic->name=$tab[$i]['nom']; + $contactstatic->firstname=$tab[$i]['firstname']; + print $contactstatic->getNomUrl(1); + } print ''; // Type de contact diff --git a/htdocs/fourn/facture/contact.php b/htdocs/fourn/facture/contact.php index 1994d2b1265..bc8bb29bd85 100644 --- a/htdocs/fourn/facture/contact.php +++ b/htdocs/fourn/facture/contact.php @@ -154,6 +154,7 @@ llxHeader('', $langs->trans("Bill"), "Facture"); $html = new Form($db); $formcompany = new FormCompany($db); $contactstatic=new Contact($db); +$userstatic=new User($db); /* *************************************************************************** */ @@ -332,15 +333,19 @@ if ($id > 0) // Contact print ''; - if ($tab[$i]['source']=='internal') - { - print ''; - print img_object($langs->trans("ShowUser"),"user").' '.$tab[$i]['nom'].''; + if ($tab[$i]['source']=='internal') + { + $userstatic->id=$tab[$i]['id']; + $userstatic->nom=$tab[$i]['nom']; + $userstatic->prenom=$tab[$i]['firstname']; + print $userstatic->getNomUrl(1); } - if ($tab[$i]['source']=='external') - { - print ''; - print img_object($langs->trans("ShowContact"),"contact").' '.$tab[$i]['nom'].''; + if ($tab[$i]['source']=='external') + { + $contactstatic->id=$tab[$i]['id']; + $contactstatic->name=$tab[$i]['nom']; + $contactstatic->firstname=$tab[$i]['firstname']; + print $contactstatic->getNomUrl(1); } print ''; diff --git a/htdocs/projet/contact.php b/htdocs/projet/contact.php index 10d2b1798a4..e0e3c3fe84e 100644 --- a/htdocs/projet/contact.php +++ b/htdocs/projet/contact.php @@ -158,7 +158,6 @@ llxHeader('', $langs->trans("Project"), $help_url); $html = new Form($db); $formcompany= new FormCompany($db); - $contactstatic=new Contact($db); $userstatic=new User($db); @@ -366,13 +365,17 @@ if ($id > 0 || ! empty($ref)) print ''; if ($tab[$i]['source']=='internal') { - print ''; - print img_object($langs->trans("ShowUser"),"user").' '.$tab[$i]['nom'].''; + $userstatic->id=$tab[$i]['id']; + $userstatic->nom=$tab[$i]['nom']; + $userstatic->prenom=$tab[$i]['firstname']; + print $userstatic->getNomUrl(1); } if ($tab[$i]['source']=='external') { - print ''; - print img_object($langs->trans("ShowContact"),"contact").' '.$tab[$i]['nom'].''; + $contactstatic->id=$tab[$i]['id']; + $contactstatic->name=$tab[$i]['nom']; + $contactstatic->firstname=$tab[$i]['firstname']; + print $contactstatic->getNomUrl(1); } print ''; diff --git a/htdocs/projet/tasks/contact.php b/htdocs/projet/tasks/contact.php index 914aa634ebd..710864e1bea 100644 --- a/htdocs/projet/tasks/contact.php +++ b/htdocs/projet/tasks/contact.php @@ -159,6 +159,7 @@ llxHeader('', $langs->trans("Task")); $html = new Form($db); $formcompany = new FormCompany($db); $contactstatic = new Contact($db); +$userstatic = new User($db); $project = new Project($db); @@ -363,16 +364,20 @@ if ($id > 0 || ! empty($ref)) // Contact print ''; - if ($tab[$i]['source']=='internal') - { - print ''; - print img_object($langs->trans("ShowUser"),"user").' '.$tab[$i]['nom'].''; - } - if ($tab[$i]['source']=='external') - { - print ''; - print img_object($langs->trans("ShowContact"),"contact").' '.$tab[$i]['nom'].''; - } + if ($tab[$i]['source']=='internal') + { + $userstatic->id=$tab[$i]['id']; + $userstatic->nom=$tab[$i]['nom']; + $userstatic->prenom=$tab[$i]['firstname']; + print $userstatic->getNomUrl(1); + } + if ($tab[$i]['source']=='external') + { + $contactstatic->id=$tab[$i]['id']; + $contactstatic->name=$tab[$i]['nom']; + $contactstatic->firstname=$tab[$i]['firstname']; + print $contactstatic->getNomUrl(1); + } print ''; // Type de contact