diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index b5bcbe3ef8f..38202a0938a 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -1354,12 +1354,13 @@ abstract class CommonObject * * @param int $statusoflink Status of links to get (-1=all). Not used. * @param string $source Source of contact: 'external' or 'thirdparty' (llx_socpeople) or 'internal' (llx_user) - * @param int $list 0:Return array contains all properties, 1:Return array contains just id + * @param int $list 0:Returned array contains all properties, 1:Return array contains just id * @param string $code Filter on this code of contact type ('SHIPPING', 'BILLING', ...) * @param int $status Status of user or company + * @param array $arrayoftcids Array with ID of type of contacts. If we provide this, we can make a ec.fk_c_type_contact in ($arrayoftcids) to avoid link on tc table. TODO Not implemented. * @return array|int Array of contacts, -1 if error */ - public function liste_contact($statusoflink = -1, $source = 'external', $list = 0, $code = '', $status = -1) + public function liste_contact($statusoflink = -1, $source = 'external', $list = 0, $code = '', $status = -1, $typecontectids = array()) { // phpcs:enable global $langs; @@ -1401,7 +1402,7 @@ abstract class CommonObject $sql .= " AND t.statut = ".((int) $status); // t is llx_socpeople } } - $sql .= " AND tc.active=1"; + $sql .= " AND tc.active = 1"; if ($statusoflink >= 0) { $sql .= " AND ec.statut = ".((int) $statusoflink); } diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php index 32192114a4c..6574cf8d09d 100644 --- a/htdocs/projet/list.php +++ b/htdocs/projet/list.php @@ -1331,6 +1331,7 @@ while ($i < $imaxinloop) { $userAccess = $object->restrictedProjectArea($user); // why this ? if ($userAccess >= 0) { + // Thirdparty $companystatic->id = $obj->socid; $companystatic->name = $obj->name; $companystatic->name_alias = $obj->alias; @@ -1343,6 +1344,21 @@ while ($i < $imaxinloop) { $companystatic->town = $obj->town; $companystatic->country_code = $obj->country_code; + // Author + $userstatic->id = $obj->fk_user_creat; + $userstatic->login = $obj->login; + $userstatic->lastname = $obj->lastname; + $userstatic->firstname = $obj->firstname; + $userstatic->email = $obj->user_email; + $userstatic->statut = $obj->user_statut; + $userstatic->entity = $obj->entity; + $userstatic->photo = $obj->photo; + $userstatic->office_phone = $obj->office_phone; + $userstatic->office_fax = $obj->office_fax; + $userstatic->user_mobile = $obj->user_mobile; + $userstatic->job = $obj->job; + $userstatic->gender = $obj->gender; + print '