From ca42d38139f52d8edf6e0792b8cfb5b6404d9112 Mon Sep 17 00:00:00 2001
From: Jacek Kowalski <Jacek@jacekk.info>
Date: Sat, 04 May 2019 12:23:02 +0000
Subject: [PATCH] Normalize stop names (add space after period)

---
 stops/index.php |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/stops/index.php b/stops/index.php
index 5795afa..2b7658b 100644
--- a/stops/index.php
+++ b/stops/index.php
@@ -48,11 +48,11 @@
 	
 	// Build a structure for the UI
 	$stop_list = [];
-	$query_lower = mb_strtolower($_GET['query'], 'UTF-8');
+	$query_lower = normalize_name_cmp($_GET['query']);
 	foreach($ids as $id) {
 		similar_text(
 			$query_lower,
-			mb_strtolower($stops[$id], 'UTF-8'),
+			normalize_name_cmp($stops[$id]),
 			$percent
 		);
 		// -5 due to UTF-8
@@ -61,7 +61,7 @@
 		}
 		$stop_list[] = [
 			'id' => $id,
-			'name' => $stops[$id],
+			'name' => normalize_name($stops[$id]),
 			'type' => 'stop',
 			'relevance' => $percent,
 		];

--
Gitblit v1.9.1