trimAccent

This commit is contained in:
Michael RICOIS 2016-07-19 09:50:24 +02:00
parent ea1a1ff861
commit f244b37dc6
2 changed files with 9 additions and 9 deletions

View File

@ -87,13 +87,13 @@ class Metier_Partenaires_MRnvp
$adrL=$tabRetI=$tabRetV=$tabRetR=$tabRetE=array();
$L1tr=$L2tr=$L3tr=0; // Par défaut, les lignes ne sont pas indiquées comme tronquées
$adrL[1]=$adrL1=trim(preg_replace('/\s+/',' ',preg_replace('/[^a-z\d ]/i', ' ', strtoupper(trimAccent($adrL1)))));
$adrL[2]=$adrL2=trim(preg_replace('/\s+/',' ',preg_replace('/[^a-z\d ]/i', ' ', strtoupper(trimAccent($adrL2)))));
$adrL[3]=$adrL3=trim(preg_replace('/\s+/',' ',preg_replace('/[^a-z\d ]/i', ' ', strtoupper(trimAccent($adrL3)))));
$adrL[4]=$adrL4=trim(preg_replace('/\s+/',' ',preg_replace('/[^a-z\d ]/i', ' ', strtoupper(trimAccent($adrL4)))));
$adrL[5]=$adrL5=trim(preg_replace('/\s+/',' ',preg_replace('/[^a-z\d ]/i', ' ', strtoupper(trimAccent($adrL5)))));
$adrL[6]=$adrL6=trim(preg_replace('/\s+/',' ',preg_replace('/[^a-z\d ]/i', ' ', strtoupper(trimAccent($adrL6)))));
$adrL[7]=$adrL7=trim(preg_replace('/\s+/',' ',preg_replace('/[^a-z\d ]/i', ' ', strtoupper(trimAccent($adrL7)))));
$adrL[1]=$adrL1=trim(preg_replace('/\s+/',' ',preg_replace('/[^a-z\d ]/i', ' ', strtoupper(Metier_Util_String::trimAccent($adrL1)))));
$adrL[2]=$adrL2=trim(preg_replace('/\s+/',' ',preg_replace('/[^a-z\d ]/i', ' ', strtoupper(Metier_Util_String::trimAccent($adrL2)))));
$adrL[3]=$adrL3=trim(preg_replace('/\s+/',' ',preg_replace('/[^a-z\d ]/i', ' ', strtoupper(Metier_Util_String::trimAccent($adrL3)))));
$adrL[4]=$adrL4=trim(preg_replace('/\s+/',' ',preg_replace('/[^a-z\d ]/i', ' ', strtoupper(Metier_Util_String::trimAccent($adrL4)))));
$adrL[5]=$adrL5=trim(preg_replace('/\s+/',' ',preg_replace('/[^a-z\d ]/i', ' ', strtoupper(Metier_Util_String::trimAccent($adrL5)))));
$adrL[6]=$adrL6=trim(preg_replace('/\s+/',' ',preg_replace('/[^a-z\d ]/i', ' ', strtoupper(Metier_Util_String::trimAccent($adrL6)))));
$adrL[7]=$adrL7=trim(preg_replace('/\s+/',' ',preg_replace('/[^a-z\d ]/i', ' ', strtoupper(Metier_Util_String::trimAccent($adrL7)))));
$dureeM=round(microtime(1)-$tDeb,3);
if ($adrL7<>'' || $adrL7<>'FRANCE' || $adrL7<>'MONACO')

View File

@ -257,7 +257,7 @@ class Metier_Partenaires_MTel
$tabRet[]=array(
'siren'=>$siren,
'nic'=>substr($res['siret'],-5),
'typeTel'=>trimAccent($tabT['telFax']),
'typeTel'=>Metier_Util_String::trimAccent($tabT['telFax']),
'infoTel'=>$tabT['type'],
'telephone'=>$tabT['telNum'],
'actif'=>1,
@ -266,7 +266,7 @@ class Metier_Partenaires_MTel
'siren'=>$siren,
'nic'=>substr($res['siret'],-5),
'dateProvPartenaire'=>date('Ymd'),
'typeTel'=>trimAccent($tabT['telFax']),
'typeTel'=>Metier_Util_String::trimAccent($tabT['telFax']),
'infoTel'=>$tabT['type'],
'telephone'=>$tabT['telNum'],
'actif'=>1,