From 9926577b2f30a34c49cc638c77e95c7d706b1723 Mon Sep 17 00:00:00 2001 From: odiea Date: Fri, 22 Mar 2024 14:39:59 -0600 Subject: [PATCH] Update Suppliers.php this allows correct sorting --- app/Controllers/Suppliers.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/Controllers/Suppliers.php b/app/Controllers/Suppliers.php index 04e86976b..4d3084f3a 100644 --- a/app/Controllers/Suppliers.php +++ b/app/Controllers/Suppliers.php @@ -44,11 +44,11 @@ class Suppliers extends Persons **/ public function getSearch(): void { - $search = $this->request->getPost('search', FILTER_SANITIZE_FULL_SPECIAL_CHARS) ?? ''; - $limit = $this->request->getPost('limit', FILTER_SANITIZE_NUMBER_INT); - $offset = $this->request->getPost('offset', FILTER_SANITIZE_NUMBER_INT); - $sort = $this->request->getPost('sort', FILTER_SANITIZE_FULL_SPECIAL_CHARS); - $order = $this->request->getPost('order', FILTER_SANITIZE_FULL_SPECIAL_CHARS); + $search = $this->request->getGet('search', FILTER_SANITIZE_FULL_SPECIAL_CHARS); + $limit = $this->request->getGet('limit', FILTER_SANITIZE_NUMBER_INT); + $offset = $this->request->getGet('offset', FILTER_SANITIZE_NUMBER_INT); + $sort = $this->request->getGet('sort', FILTER_SANITIZE_FULL_SPECIAL_CHARS); + $order = $this->request->getGet('order', FILTER_SANITIZE_FULL_SPECIAL_CHARS); $suppliers = $this->supplier->search($search, $limit, $offset, $sort, $order); $total_rows = $this->supplier->get_found_rows($search);