From cdd1b8d0995064c7dc42241e8a74409c279fecca Mon Sep 17 00:00:00 2001 From: Arkezar Date: Sun, 22 Jul 2018 10:25:13 +0200 Subject: [PATCH] Revert "Sort universe search results with Levenshtein's function" This reverts commit 98a523c941956f8be32a3cb4b027dddd49d1f3b7. --- app/main/controller/api/universe.php | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/app/main/controller/api/universe.php b/app/main/controller/api/universe.php index 4651463c..e59e580b 100644 --- a/app/main/controller/api/universe.php +++ b/app/main/controller/api/universe.php @@ -32,16 +32,6 @@ class Universe extends Controller\AccessController { !empty($categories) ){ $universeNameData = Ccp\Universe::searchUniverseNameData($categories, $search); - - foreach($categories as &$category) { - if(!empty($universeNameData[$category])){ - usort($universeNameData[$category], function($a, $b) use ($search) { - $levA = levenshtein($search, strtolower($a["name"])); - $levB = levenshtein($search, strtolower($b["name"])); - return $levA == $levB ? 0 : ($levA > $levB ? 1 : -1); - }); - } - } } echo json_encode($universeNameData);