From a57f161e261fce97c264a906be8782dbd92ca8b4 Mon Sep 17 00:00:00 2001
From: Jacek Kowalski <Jacek@jacekk.info>
Date: Wed, 28 Jul 2021 21:49:55 +0000
Subject: [PATCH] Fix proxy as bus TTSS started returning status "HTTP/1.1 200 "

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

diff --git a/stops/index.php b/stops/index.php
index 2b7658b..eca9c39 100644
--- a/stops/index.php
+++ b/stops/index.php
@@ -50,11 +50,12 @@
 	$stop_list = [];
 	$query_lower = normalize_name_cmp($_GET['query']);
 	foreach($ids as $id) {
-		similar_text(
+		$letters = similar_text(
 			$query_lower,
 			normalize_name_cmp($stops[$id]),
 			$percent
 		);
+		$percent += $letters * 100;
 		// -5 due to UTF-8
 		if(substr($stops[$id], -5) == '(nż)' && !$find_ondemand) {
 			$percent /= 2;

--
Gitblit v1.9.1