mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-14 03:52:21 +03:00
Make the search method order_by and offset use the provided values
This commit is contained in:
parent
f1a00b8f39
commit
949a73ad58
10 changed files with 20 additions and 20 deletions
|
@ -91,11 +91,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);
|
||||
|
||||
|
|
|
@ -149,11 +149,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);
|
||||
|
||||
|
|
|
@ -104,11 +104,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);
|
||||
|
||||
|
|
|
@ -100,11 +100,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