mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-10 10:02:33 +03:00
Make the search method order_by and offset use the provided values
This commit is contained in:
parent
8c3731a2c3
commit
cc5331e1dc
10 changed files with 20 additions and 20 deletions
|
@ -89,11 +89,11 @@ class Admins extends EA_Controller
|
|||
|
||||
$keyword = request('keyword', '');
|
||||
|
||||
$order_by = 'update_datetime DESC';
|
||||
$order_by = request('order_by', 'update_datetime DESC');
|
||||
|
||||
$limit = request('limit', 1000);
|
||||
|
||||
$offset = 0;
|
||||
$offset = (int) request('offset', '0');
|
||||
|
||||
$admins = $this->admins_model->search($keyword, $limit, $offset, $order_by);
|
||||
|
||||
|
|
|
@ -62,11 +62,11 @@ class Appointments extends EA_Controller
|
|||
|
||||
$keyword = request('keyword', '');
|
||||
|
||||
$order_by = 'update_datetime DESC';
|
||||
$order_by = request('order_by', 'update_datetime DESC');
|
||||
|
||||
$limit = request('limit', 1000);
|
||||
|
||||
$offset = 0;
|
||||
$offset = (int) request('offset', '0');
|
||||
|
||||
$appointments = $this->appointments_model->search($keyword, $limit, $offset, $order_by);
|
||||
|
||||
|
|
|
@ -90,11 +90,11 @@ class Blocked_periods extends EA_Controller
|
|||
|
||||
$keyword = request('keyword', '');
|
||||
|
||||
$order_by = 'update_datetime DESC';
|
||||
$order_by = request('order_by', 'update_datetime DESC');
|
||||
|
||||
$limit = request('limit', 1000);
|
||||
|
||||
$offset = 0;
|
||||
$offset = (int) request('offset', '0');
|
||||
|
||||
$blocked_periods = $this->blocked_periods_model->search($keyword, $limit, $offset, $order_by);
|
||||
|
||||
|
|
|
@ -147,11 +147,11 @@ class Customers extends EA_Controller
|
|||
|
||||
$keyword = request('keyword', '');
|
||||
|
||||
$order_by = 'update_datetime DESC';
|
||||
$order_by = request('order_by', 'update_datetime DESC');
|
||||
|
||||
$limit = request('limit', 1000);
|
||||
|
||||
$offset = 0;
|
||||
$offset = (int) request('offset', '0');
|
||||
|
||||
$customers = $this->customers_model->search($keyword, $limit, $offset, $order_by);
|
||||
|
||||
|
|
|
@ -102,11 +102,11 @@ class Providers extends EA_Controller
|
|||
|
||||
$keyword = request('keyword', '');
|
||||
|
||||
$order_by = 'update_datetime DESC';
|
||||
$order_by = request('order_by', 'update_datetime DESC');
|
||||
|
||||
$limit = request('limit', 1000);
|
||||
|
||||
$offset = 0;
|
||||
$offset = (int) request('offset', '0');
|
||||
|
||||
$providers = $this->providers_model->search($keyword, $limit, $offset, $order_by);
|
||||
|
||||
|
|
|
@ -98,11 +98,11 @@ class Secretaries extends EA_Controller
|
|||
|
||||
$keyword = request('keyword', '');
|
||||
|
||||
$order_by = 'update_datetime DESC';
|
||||
$order_by = request('order_by', 'update_datetime DESC');
|
||||
|
||||
$limit = request('limit', 1000);
|
||||
|
||||
$offset = 0;
|
||||
$offset = (int) request('offset', '0');
|
||||
|
||||
$secretaries = $this->secretaries_model->search($keyword, $limit, $offset, $order_by);
|
||||
|
||||
|
|
|
@ -87,11 +87,11 @@ class Service_categories extends EA_Controller
|
|||
|
||||
$keyword = request('keyword', '');
|
||||
|
||||
$order_by = 'update_datetime DESC';
|
||||
$order_by = request('order_by', 'update_datetime DESC');
|
||||
|
||||
$limit = request('limit', 1000);
|
||||
|
||||
$offset = 0;
|
||||
$offset = (int) request('offset', '0');
|
||||
|
||||
$service_categories = $this->service_categories_model->search($keyword, $limit, $offset, $order_by);
|
||||
|
||||
|
|
|
@ -88,11 +88,11 @@ class Services extends EA_Controller
|
|||
|
||||
$keyword = request('keyword', '');
|
||||
|
||||
$order_by = 'update_datetime DESC';
|
||||
$order_by = request('order_by', 'update_datetime DESC');
|
||||
|
||||
$limit = request('limit', 1000);
|
||||
|
||||
$offset = 0;
|
||||
$offset = (int) request('offset', '0');
|
||||
|
||||
$services = $this->services_model->search($keyword, $limit, $offset, $order_by);
|
||||
|
||||
|
|
|
@ -47,11 +47,11 @@ class Unavailabilities extends EA_Controller
|
|||
|
||||
$keyword = request('keyword', '');
|
||||
|
||||
$order_by = 'update_datetime DESC';
|
||||
$order_by = request('order_by', 'update_datetime DESC');
|
||||
|
||||
$limit = request('limit', 1000);
|
||||
|
||||
$offset = 0;
|
||||
$offset = (int) request('offset', '0');
|
||||
|
||||
$unavailabilities = $this->unavailabilities_model->search($keyword, $limit, $offset, $order_by);
|
||||
|
||||
|
|
|
@ -106,11 +106,11 @@ class Webhooks extends EA_Controller
|
|||
|
||||
$keyword = request('keyword', '');
|
||||
|
||||
$order_by = 'update_datetime DESC';
|
||||
$order_by = request('order_by', 'update_datetime DESC');
|
||||
|
||||
$limit = request('limit', 1000);
|
||||
|
||||
$offset = 0;
|
||||
$offset = (int) request('offset', '0');
|
||||
|
||||
$webhooks = $this->webhooks_model->search($keyword, $limit, $offset, $order_by);
|
||||
|
||||
|
|
Loading…
Reference in a new issue