Sfoglia il codice sorgente

Fix bug where region code is overridden

Alan Lam 7 anni fa
parent
commit
089a5dad34
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  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);
 $customer = Customer::get($customer_id);
 if(!$customer) die("Customer not found.");
 if(!$customer) die("Customer not found.");
 
 
-$region = readline("Type region code: ");
+$region_code = readline("Type region code: ");
 
 
 $confirm = readline($customer->name . ": Confirm Y/N: ");
 $confirm = readline($customer->name . ": Confirm Y/N: ");
 if($confirm != "Y") die("Aborted");
 if($confirm != "Y") die("Aborted");
@@ -147,7 +147,7 @@ for($i = 0; $data = fgetcsv($handle); $i++) {
 			}
 			}
 
 
 			try {
 			try {
-				$results = Geolocation::geocode($query, $region);
+				$results = Geolocation::geocode($query, $region_code);
 				if($results) {
 				if($results) {
 					$result = $results[0];
 					$result = $results[0];
 					$location->latitude = $result->geometry->location->lat;
 					$location->latitude = $result->geometry->location->lat;