From 0f7c12c55bc077c32263aac5da762ac4be7c14dd Mon Sep 17 00:00:00 2001 From: petrtr Date: Fri, 25 Jul 2014 12:04:11 +0400 Subject: [PATCH] Update Datatables.php Show all data if paging not set. --- src/Bllim/Datatables/Datatables.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Bllim/Datatables/Datatables.php b/src/Bllim/Datatables/Datatables.php index 301199b3..5b5ce18c 100644 --- a/src/Bllim/Datatables/Datatables.php +++ b/src/Bllim/Datatables/Datatables.php @@ -60,8 +60,8 @@ public function __construct() { // version < 1.10 $this->input['draw'] = Input::get('sEcho',''); - $this->input['start'] = Input::get('iDisplayStart',''); - $this->input['length'] = Input::get('iDisplayLength',''); + $this->input['start'] = Input::get('iDisplayStart'); + $this->input['length'] = Input::get('iDisplayLength'); $this->input['search'] = array( 'value' => Input::get('sSearch',''), 'regex' => Input::get('bRegex',''), @@ -432,7 +432,7 @@ protected function include_in_array($item,$array) */ protected function paging() { - if(!is_null($this->input['start']) && $this->input['start'] != -1) + if(!is_null($this->input['start']) && !is_null($this->input['length'])) { $this->query->skip($this->input['start'])->take((int)$this->input['length']>0?$this->input['length']:10); }