mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-12 10:52:37 +01:00
Fix: uniformize code
This commit is contained in:
@@ -41,10 +41,13 @@ if (empty($phone))
|
||||
exit;
|
||||
}
|
||||
|
||||
$sql = "select nom from llx_societe s ";
|
||||
$sql.= "left join llx_socpeople sp on sp.fk_soc=s.rowid";
|
||||
$sql.= " where s.tel='".addslashes($phone)."' or sp.phone='".addslashes($phone)."' or sp.phone_perso='".addslashes($phone)."' or sp.phone_mobile='".addslashes($phone)."'";
|
||||
//$sql.= " AND entity=".$conf->entity;
|
||||
$sql = "SELECT nom FROM ".MAIN_DB_PREFIX."societe as s";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople as sp ON sp.fk_soc = s.rowid";
|
||||
$sql.= " WHERE s.entity=".$conf->entity;
|
||||
$sql.= " AND (s.tel='".addslashes($phone)."'";
|
||||
$sql.= " OR sp.phone='".addslashes($phone)."'";
|
||||
$sql.= " OR sp.phone_perso='".addslashes($phone)."'";
|
||||
$sql.= " OR sp.phone_mobile='".addslashes($phone)."')";
|
||||
$sql.= $db->plimit(1);
|
||||
|
||||
dol_syslog('cidlookup search information with phone '.$phone, LOG_DEBUG);
|
||||
|
||||
Reference in New Issue
Block a user