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:
bachy
2012-05-21 17:50:22 +02:00
parent 9e85e7a105
commit 18982b6700
5 changed files with 46 additions and 23 deletions

View File

@@ -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++;
}