diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php index a495a3e7323b4..851fa9595410f 100755 --- a/htdocs/contact/list.php +++ b/htdocs/contact/list.php @@ -1,7 +1,7 @@ * Copyright (C) 2003 Eric Seigne - * Copyright (C) 2004-2011 Laurent Destailleur + * Copyright (C) 2004-2012 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * * This program is free software; you can redistribute it and/or modify @@ -113,8 +113,8 @@ $form=new Form($db); -$sql = "SELECT s.rowid as socid, s.nom,"; -$sql.= " p.rowid as cidp, p.name, p.firstname, p.poste, p.email,"; +$sql = "SELECT s.rowid as socid, s.nom as name,"; +$sql.= " p.rowid as cidp, p.name as lastname, p.firstname, p.poste, p.email,"; $sql.= " p.phone, p.phone_mobile, p.fax, p.fk_pays, p.priv, p.tms,"; $sql.= " cp.code as pays_code"; $sql.= " FROM ".MAIN_DB_PREFIX."socpeople as p"; @@ -338,7 +338,7 @@ // Name print ''; - $contactstatic->name=$obj->name; + $contactstatic->lastname=$obj->lastname; $contactstatic->firstname=''; $contactstatic->id=$obj->cidp; print $contactstatic->getNomUrl(1,'',20); @@ -357,7 +357,7 @@ if ($obj->socid) { print ''; - print img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($obj->nom,20).''; + print img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($obj->name,20).''; } else {