Skip to content

Commit 485c1e0

Browse files
author
Kamil Tunkiewicz
committed
Merge pull request #123 from petrtr/patch-1
Update Datatables.php
2 parents 593f1a2 + 0f7c12c commit 485c1e0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Bllim/Datatables/Datatables.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ public function __construct() {
6060
// version < 1.10
6161

6262
$this->input['draw'] = Input::get('sEcho','');
63-
$this->input['start'] = Input::get('iDisplayStart','');
64-
$this->input['length'] = Input::get('iDisplayLength','');
63+
$this->input['start'] = Input::get('iDisplayStart');
64+
$this->input['length'] = Input::get('iDisplayLength');
6565
$this->input['search'] = array(
6666
'value' => Input::get('sSearch',''),
6767
'regex' => Input::get('bRegex',''),
@@ -432,7 +432,7 @@ protected function include_in_array($item,$array)
432432
*/
433433
protected function paging()
434434
{
435-
if(!is_null($this->input['start']) && $this->input['start'] != -1)
435+
if(!is_null($this->input['start']) && !is_null($this->input['length']))
436436
{
437437
$this->query->skip($this->input['start'])->take((int)$this->input['length']>0?$this->input['length']:10);
438438
}

0 commit comments

Comments
 (0)