Merge pull request #920 from marcosgdf/refactor
Removed duplicated code
This commit is contained in:
commit
c05d593a2a
@ -1574,7 +1574,7 @@ class User extends CommonObject
|
|||||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."user_clicktodial";
|
$sql = "DELETE FROM ".MAIN_DB_PREFIX."user_clicktodial";
|
||||||
$sql .= " WHERE fk_user = ".$this->id;
|
$sql .= " WHERE fk_user = ".$this->id;
|
||||||
|
|
||||||
dol_syslog(get_class($this).'::update_clicktodial sql='.$sql);
|
dol_syslog(get_class($this).'::update_clicktodial sql='.$sql);
|
||||||
$result = $this->db->query($sql);
|
$result = $this->db->query($sql);
|
||||||
|
|
||||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."user_clicktodial";
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."user_clicktodial";
|
||||||
@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user