Fix deprecated code
This commit is contained in:
parent
4f2259ea38
commit
bd5dc6399b
@ -1456,6 +1456,7 @@ class Form
|
||||
$langs->load('companies');
|
||||
|
||||
if (empty($htmlid)) $htmlid = $htmlname;
|
||||
$num = 0;
|
||||
|
||||
if ($selected === '') $selected = array();
|
||||
elseif (!is_array($selected)) $selected = array($selected);
|
||||
@ -4999,7 +5000,8 @@ class Form
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<table class="nobordernopadding" cellpadding="0" cellspacing="0">';
|
||||
print '<tr><td>';
|
||||
$num = $this->select_contacts($societe->id, $selected, $htmlname);
|
||||
print $this->selectcontacts($societe->id, $selected, $htmlname);
|
||||
$num = $this->num;
|
||||
if ($num == 0)
|
||||
{
|
||||
$addcontact = (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("AddContact") : $langs->trans("AddContactAddress"));
|
||||
|
||||
@ -385,7 +385,7 @@ class FormTicket
|
||||
// If no socid, set to -1 to avoid full contacts list
|
||||
$selectedCompany = ($this->withfromsocid > 0) ? $this->withfromsocid : -1;
|
||||
print img_picto('', 'contact', 'class="paddingright"');
|
||||
$nbofcontacts = $form->select_contacts($selectedCompany, $this->withfromcontactid, 'contactid', 3, '', '', 0, 'minwidth200');
|
||||
print $form->selectcontacts($selectedCompany, $this->withfromcontactid, 'contactid', 3, '', '', 0, 'minwidth200');
|
||||
print ' ';
|
||||
$formcompany->selectTypeContact($ticketstatic, '', 'type', 'external', '', 0, 'maginleftonly');
|
||||
print '</td></tr>';
|
||||
|
||||
@ -84,7 +84,7 @@ if ($action == 'addcontact' && $user->rights->projet->creer)
|
||||
{
|
||||
header("Location: ".$_SERVER["PHP_SELF"]."?id=".$object->id.($withproject ? '&withproject=1' : ''));
|
||||
exit;
|
||||
} else {
|
||||
} else {$nbofcontacts
|
||||
if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS')
|
||||
{
|
||||
$langs->load("errors");
|
||||
@ -423,7 +423,8 @@ if ($id > 0 || !empty($ref))
|
||||
|
||||
print '<td>';
|
||||
$contactofproject = $projectstatic->getListContactId('external');
|
||||
$nbofcontacts = $form->select_contacts($selectedCompany, '', 'contactid', 0, '', $contactofproject);
|
||||
print $form->selectcontacts($selectedCompany, '', 'contactid', 0, '', $contactofproject);
|
||||
$nbofcontacts = $form->num;
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
$formcompany->selectTypeContact($object, '', 'type', 'external', 'rowid');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user