Alan Lam 7 лет назад
Родитель
Сommit
d67b033c96
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      tasks/import_venues.php

+ 2 - 2
tasks/import_venues.php

@@ -9,7 +9,7 @@ $customer_id = readline("Type customer ID: ");
 $customer = Customer::get($customer_id);
 if(!$customer) die("Customer not found.");
 
-$region_code = readline("Type region code: ");
+$region_code = readline("Type region code (leave blank to skip geocoding): ");
 
 $confirm = readline($customer->name . ": Confirm Y/N: ");
 if($confirm != "Y") die("Aborted");
@@ -145,7 +145,7 @@ for($i = 0; $data = fgetcsv($handle); $i++) {
 
 	if(!empty($postal_code)) $location->postal_code = $postal_code;
 
-	if(!$location->latitude) {
+	if($region && !$location->latitude) {
 
 		for($attempt = 0; $attempt < 2; $attempt++) {