mirror of
https://koodu.h-i.works/projects/thebadspace
synced 2025-06-25 16:04:37 -05:00
Fix for filtering, quick fix for rating term swap
There was a small syntax bug that was causing the sytem to error out when resetting rating terms. Also plugged a bug that was returning locations with ony one block count, which is below the criteria for instances that should be listed and shown in search results
This commit is contained in:
@ -34,7 +34,14 @@ class FrontIndexController extends Controller
|
||||
$rawSearch = $terms;
|
||||
$terms = str_replace(",", "", $terms);
|
||||
$terms = str_replace(" ", "|", $terms);
|
||||
$results = DB::select("SELECT * FROM searchlocations('$terms')");
|
||||
$raw = DB::select("SELECT * FROM searchlocations('$terms')");
|
||||
$results = [];
|
||||
|
||||
foreach ($raw as $item) {
|
||||
if ($item->block_count > 2) {
|
||||
array_push($results, $item);
|
||||
}
|
||||
}
|
||||
|
||||
$locations = Location::where("active", true)->get();
|
||||
$count = count($locations);
|
||||
|
Reference in New Issue
Block a user