bug fixing
ccode homonym companies terms tel to long set to memo instead of phone field Signed-off-by: bachy <git@g-u-i.net>
This commit is contained in:
@@ -75,6 +75,8 @@ class MaterioIndustrialAdminUserMigration extends MaterioBasicMigration {
|
||||
return false;
|
||||
|
||||
$cr->company = trim($cr->company);
|
||||
if(count(taxonomy_get_term_by_name($cr->company.'-'.$cr->id_industrial)))
|
||||
$cr->company .= '-'.$cr->id_industrial;
|
||||
|
||||
$cr->memo = "#admin";
|
||||
|
||||
@@ -196,11 +198,11 @@ class MaterioIndustrialAdminProfile2Migration extends MaterioBasicMigration {
|
||||
$ccs = cck_phone_countrycodes();
|
||||
$match = 0;
|
||||
foreach ($ccs as $cc => $cc_values) {
|
||||
if('+'.$cr->ccode1_admin == $cc_values['code']){
|
||||
if('+'.preg_replace('/^\+/', '', $cr->ccode1_admin) == $cc_values['code']){
|
||||
$cr->ccode1_admin = $cc;
|
||||
$match++;
|
||||
}
|
||||
if('+'.$cr->ccode2_admin == $cc_values['code']){
|
||||
if('+'.preg_replace('/^\+/', '', $cr->ccode2_admin) == $cc_values['code']){
|
||||
$cr->ccode2_admin = $cc;
|
||||
$match++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user