1
0
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:
Ro
2023-09-11 17:40:13 -07:00
parent d88491be91
commit aa8daaf895
2 changed files with 35 additions and 39 deletions

View File

@ -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);