mirror of
https://koodu.h-i.works/projects/thebadspace
synced 2025-06-25 16:04:37 -05:00
Listing style tweaks
Cleaned up pagination to make it easier to identify what page is currently being displayed and tweaks font sizes of page links for better legibility.
This commit is contained in:
@ -45,11 +45,18 @@ class HandleLocations
|
||||
$response = null;
|
||||
//$utils = new StringTools();
|
||||
//$term = $utils->removeCommonWords($terms);
|
||||
$terms = str_replace(",", "", $terms);
|
||||
$terms = str_replace(" ", "|", $terms);
|
||||
$rawSearch = $terms;
|
||||
$terms = str_replace(",", "", $terms);
|
||||
$terms = str_replace(" ", "|", $terms);
|
||||
|
||||
try {
|
||||
$search = $this->connection->fetchAllAssociative("SELECT * FROM searchlocations('$terms')");
|
||||
$active = [];
|
||||
foreach ($search as $item) {
|
||||
if ($item["active"] == true) {
|
||||
array_push($active, $item);
|
||||
}
|
||||
}
|
||||
} catch (PDOException $error) {
|
||||
$errorMessage = $error->getMessage();
|
||||
} catch (DBALException $error) {
|
||||
@ -71,8 +78,8 @@ class HandleLocations
|
||||
$response = [
|
||||
"status" => true,
|
||||
"message" => "Good Reqeust",
|
||||
"items" => $search,
|
||||
"terms" => $terms,
|
||||
"items" => $active,
|
||||
"terms" => $rawSearch,
|
||||
];
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user