Skip to content

Commit

Permalink
Merge pull request #171 from nesl247/master
Browse files Browse the repository at this point in the history
Fixes pagination occurring even if it is disabled in DataTables.
  • Loading branch information
MarkVaughn committed Feb 12, 2015
2 parents 2f31def + 9b89c60 commit 30d8619
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Bllim/Datatables/Datatables.php
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ protected function includeInArray($item, $array)
*/
protected function paging()
{
if (!is_null($this->input['start']) && !is_null($this->input['length'])) {
if (!is_null($this->input['start']) && !is_null($this->input['length']) && $this->input['length'] != -1) {
$this->query->skip($this->input['start'])->take((int)$this->input['length'] > 0 ? $this->input['length'] : 10);
}
}
Expand Down

0 comments on commit 30d8619

Please sign in to comment.