Merge pull request #920 from marcosgdf/refactor

Removed duplicated code
This commit is contained in:
Juanjo Menent 2013-05-06 07:04:15 -07:00
commit c05d593a2a

View File

@ -1739,14 +1739,11 @@ class User extends CommonObject
$lien = '<a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$this->id.'">'; $lien = '<a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$this->id.'">';
$lienfin='</a>'; $lienfin='</a>';
if ($option == 'xxx') if ($withpicto)
{ {
$lien = '<a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$this->id.'">'; $result.=($lien.img_object($langs->trans("ShowUser"),'user').$lienfin);
$lienfin='</a>'; if ($withpicto != 2) $result.=' ';
} }
if ($withpicto) $result.=($lien.img_object($langs->trans("ShowUser"),'user').$lienfin);
if ($withpicto && $withpicto != 2) $result.=' ';
$result.=$lien.$this->getFullName($langs).$lienfin; $result.=$lien.$this->getFullName($langs).$lienfin;
return $result; return $result;
} }