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

+ 4 - 4
tasks/import_venues.php

@@ -2,16 +2,16 @@
 
 require "../initialise.php";
 
-$path = readline("Type relative path to file, CWD is " . getcwd() . ": ");
+$path = trim(readline("Type relative path to file, CWD is " . getcwd() . ": "));
 if(!file_exists($path)) die($path . " not found.");
 
-$customer_id = readline("Type customer ID: ");
+$customer_id = trim(readline("Type customer ID: "));
 $customer = Customer::get($customer_id);
 if(!$customer) die("Customer not found.");
 
-$region_code = readline("Type region code (leave blank to skip geocoding): ");
+$region_code = trim(readline("Type region code (leave blank to skip geocoding): "));
 
-$confirm = readline($customer->name . ": Confirm Y/N: ");
+$confirm = trim(readline($customer->name . ": Confirm Y/N: "));
 if($confirm != "Y") die("Aborted");
 
 $handle = fopen($path, "r");