Fix selection of user was lost

This commit is contained in:
Laurent Destailleur
2015-04-23 13:54:49 +02:00
parent 47ecb91a3e
commit c97c5e0cfd

View File

@@ -375,10 +375,13 @@ if ($id > 0 || ! empty($ref))
print '<td class="nowrap">';
print img_object('','user','class="hideonsmartphone"');
$contactsoftask=$object->getListContactId('internal');
if (count($contactsoftask)>0) {
if (count($contactsoftask)>0)
{
$userid=$contactsoftask[0];
print $form->select_dolusers($userid,'userid',0,'',0,'',$contactsoftask);
}else {
print $form->select_dolusers((GETPOST('userid')?GETPOST('userid'):$userid),'userid',0,'',0,'',$contactsoftask);
}
else
{
print img_error($langs->trans('FirstAddRessourceToAllocateTime')).$langs->trans('FirstAddRessourceToAllocateTime');
}
print '</td>';