Qual: Removed deprecated method

This commit is contained in:
Laurent Destailleur 2010-05-09 15:15:10 +00:00
parent 0e83ec1359
commit 426317a355
10 changed files with 23 additions and 59 deletions

View File

@ -335,9 +335,8 @@ if ($id > 0 || ! empty($ref))
print '<td align="left">';
if ($tab[$i]['socid'] > 0)
{
print '<a href="'.DOL_URL_ROOT.'/soc.php?socid='.$tab[$i]['socid'].'">';
print img_object($langs->trans("ShowCompany"),"company").' '.$companystatic->get_nom($tab[$i]['socid']);
print '</a>';
$companystatic->fetch($tab[$i]['socid']);
print $companystatic->getNomUrl(1);
}
if ($tab[$i]['socid'] < 0)
{

View File

@ -332,9 +332,8 @@ if ($id > 0 || ! empty($ref))
print '<td align="left">';
if ($tab[$i]['socid'] > 0)
{
print '<a href="'.DOL_URL_ROOT.'/soc.php?socid='.$tab[$i]['socid'].'">';
print img_object($langs->trans("ShowCompany"),"company").' '.$companystatic->get_nom($tab[$i]['socid']);
print '</a>';
$companystatic->fetch($tab[$i]['socid']);
print $companystatic->getNomUrl(1);
}
if ($tab[$i]['socid'] < 0)
{

View File

@ -327,9 +327,8 @@ if ($id > 0 || ! empty($ref))
print '<td align="left">';
if ($tab[$i]['socid'] > 0)
{
print '<a href="'.DOL_URL_ROOT.'/soc.php?socid='.$tab[$i]['socid'].'">';
print img_object($langs->trans("ShowCompany"),"company").' '.$companystatic->get_nom($tab[$i]['socid']);
print '</a>';
$companystatic->fetch($tab[$i]['socid']);
print $companystatic->getNomUrl(1);
}
if ($tab[$i]['socid'] < 0)
{

View File

@ -279,7 +279,7 @@ if ($id > 0)
print '<td colspan="1">';
//$contactAlreadySelected = $contrat->getListContactId('external'); // On ne doit pas desactiver un contact deja selectionner car on doit pouvoir le seclectionner une deuxieme fois pour un autre type
$nbofcontacts=$html->select_contacts($selectedCompany, $selected = '', 'contactid', 0, $contactAlreadySelected);
$nbofcontacts=$html->select_contacts($selectedCompany, '', 'contactid', 0, $contactAlreadySelected);
if ($nbofcontacts == 0) print $langs->trans("NoContactDefined");
print '</td>';
print '<td>';
@ -331,9 +331,8 @@ if ($id > 0)
print '<td align="left">';
if ($tab[$i]['socid'] > 0)
{
print '<a href="'.DOL_URL_ROOT.'/soc.php?socid='.$tab[$i]['socid'].'">';
print img_object($langs->trans("ShowCompany"),"company").' '.$companystatic->get_nom($tab[$i]['socid']);
print '</a>';
$companystatic->fetch($tab[$i]['socid']);
print $companystatic->getNomUrl(1);
}
if ($tab[$i]['socid'] < 0)
{

View File

@ -266,7 +266,7 @@ if ($id > 0)
print '<td colspan="1">';
//$contactAlreadySelected = $fichinter->getListContactId('external'); // On ne doit pas desactiver un contact deja selectionner car on doit pouvoir le seclectionner une deuxieme fois pour un autre type
$nbofcontacts=$html->select_contacts($selectedCompany, $selected = '', 'contactid', 0, $contactAlreadySelected);
$nbofcontacts=$html->select_contacts($selectedCompany, '', 'contactid', 0, $contactAlreadySelected);
if ($nbofcontacts == 0) print $langs->trans("NoContactDefined");
print '</td>';
print '<td>';
@ -317,9 +317,8 @@ if ($id > 0)
print '<td align="left">';
if ($tab[$i]['socid'] > 0)
{
print '<a href="'.DOL_URL_ROOT.'/soc.php?socid='.$tab[$i]['socid'].'">';
print img_object($langs->trans("ShowCompany"),"company").' '.$companystatic->get_nom($tab[$i]['socid']);
print '</a>';
$companystatic->fetch($tab[$i]['socid']);
print $companystatic->getNomUrl(1);
}
if ($tab[$i]['socid'] < 0)
{

View File

@ -200,6 +200,8 @@ if ($id > 0 || ! empty($ref))
print '</div>';
// TODO All contact.php pages use this huge part of code. Use a function instead.
/*
* Lignes de contacts
*/
@ -207,12 +209,10 @@ if ($id > 0 || ! empty($ref))
/*
* Ajouter une ligne de contact
* Non affich<EFBFBD> en mode modification de ligne
* Non affiche en mode modification de ligne
*/
if ($_GET["action"] != 'editline' && $user->rights->fournisseur->facture->creer)
{
// TODO All contacts page should use same code
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Source").'</td>';
print '<td>'.$langs->trans("Company").'</td>';
@ -324,9 +324,8 @@ if ($id > 0 || ! empty($ref))
print '<td align="left">';
if ($tab[$i]['socid'] > 0)
{
print '<a href="'.DOL_URL_ROOT.'/soc.php?socid='.$tab[$i]['socid'].'">';
print img_object($langs->trans("ShowCompany"),"company").' '.$companystatic->get_nom($tab[$i]['socid']);
print '</a>';
$companystatic->fetch($tab[$i]['socid']);
print $companystatic->getNomUrl(1);
}
if ($tab[$i]['socid'] < 0)
{

View File

@ -316,9 +316,8 @@ if ($id > 0)
print '<td align="left">';
if ($tab[$i]['socid'] > 0)
{
print '<a href="'.DOL_URL_ROOT.'/soc.php?socid='.$tab[$i]['socid'].'">';
print img_object($langs->trans("ShowCompany"),"company").' '.$companystatic->get_nom($tab[$i]['socid']);
print '</a>';
$companystatic->fetch($tab[$i]['socid']);
print $companystatic->getNomUrl(1);
}
if ($tab[$i]['socid'] < 0)
{

View File

@ -341,9 +341,8 @@ if ($id > 0 || ! empty($ref))
print '<td align="left">';
if ($tab[$i]['socid'] > 0)
{
print '<a href="'.DOL_URL_ROOT.'/soc.php?socid='.$tab[$i]['socid'].'">';
print img_object($langs->trans("ShowCompany"),"company").' '.$companystatic->get_nom($tab[$i]['socid']);
print '</a>';
$companystatic->fetch($tab[$i]['socid']);
print $companystatic->getNomUrl(1);
}
if ($tab[$i]['socid'] < 0)
{

View File

@ -344,9 +344,8 @@ if ($id > 0 || ! empty($ref))
print '<td align="left">';
if ($tab[$i]['socid'] > 0)
{
print '<a href="'.DOL_URL_ROOT.'/soc.php?socid='.$tab[$i]['socid'].'">';
print img_object($langs->trans("ShowCompany"),"company").' '.$companystatic->get_nom($tab[$i]['socid']);
print '</a>';
$companystatic->fetch($tab[$i]['socid']);
print $companystatic->getNomUrl(1);
}
if ($tab[$i]['socid'] < 0)
{

View File

@ -1331,33 +1331,6 @@ class Societe extends CommonObject
}
/**
* \brief Renvoie le nom d'une societe a partir d'un id
* \param id id company we search for name
* \return string Third party name
*/
function get_nom($id)
{
$sql = "SELECT nom FROM ".MAIN_DB_PREFIX."societe WHERE rowid='".$id."';";
$result = $this->db->query($sql);
if ($result)
{
if ($this->db->num_rows())
{
$obj = $this->db->fetch_object($result);
return $obj->nom;
}
$this->db->free();
}
else {
dol_print_error($this->db);
}
}
/**
* \brief Return full address of a third party (TODO in format of its country)
* \return string Full address string