summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2012-01-01 02:58:38 +0000
committerivan <ivan>2012-01-01 02:58:38 +0000
commit08fe29390989d98c5247e86416a5a73a241f9522 (patch)
tree99a1358e49b99e83f4de19f97e9f5c587e638dcd
parentf84042a59546eedba93a9d47c5d20fc28cb1e158 (diff)
prevent automatic geocoding when upgrading an old db, RT#15539
-rw-r--r--FS/FS/cust_main.pm13
1 files changed, 8 insertions, 5 deletions
diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm
index 1cb2b0ac1..687e3114b 100644
--- a/FS/FS/cust_main.pm
+++ b/FS/FS/cust_main.pm
@@ -1499,12 +1499,14 @@ sub replace {
}
- $self->set_coord
- if ! $self->coord_auto && ! $self->latitude && ! $self->longitude;
+ unless ( $import ) {
+ $self->set_coord
+ if ! $self->coord_auto && ! $self->latitude && ! $self->longitude;
- $self->set_coord('ship_')
- if $self->has_ship_address && ! $self->ship_coord_auto
- && ! $self->ship_latitude && ! $self->ship_longitude;
+ $self->set_coord('ship_')
+ if $self->has_ship_address && ! $self->ship_coord_auto
+ && ! $self->ship_latitude && ! $self->ship_longitude;
+ }
local($ignore_expired_card) = 1
if $old->payby =~ /^(CARD|DCRD)$/
@@ -5034,6 +5036,7 @@ sub _upgrade_data { #class method
local($ignore_illegal_zip) = 1;
local($ignore_banned_card) = 1;
local($skip_fuzzyfiles) = 1;
+ local($import) = 1; #prevent automatic geocoding (need its own variable?)
$class->_upgrade_otaker(%opts);
}