From b0006e78d9f3b7a091d08f6872b90d95beb38dbf Mon Sep 17 00:00:00 2001 From: Oxid3 Date: Thu, 5 Dec 2019 16:22:34 +0000 Subject: [PATCH 1/2] Update DataSet.php --- src/DataSet.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/DataSet.php b/src/DataSet.php index 7d3d69f8..499d3e85 100644 --- a/src/DataSet.php +++ b/src/DataSet.php @@ -184,7 +184,7 @@ public function build($rowproc = null) // Calculate page variable. // $limit is set to only export a subset - if (isset($this->limit)) { + if (!empty($this->limit)) { $limit = $this->limit; $current_page = $this->url->value('page'.$this->cid, 0); $offset = (max($current_page-1,0)) * $limit; @@ -230,7 +230,7 @@ public function build($rowproc = null) case "array": //orderby - if (isset($this->orderby)) { + if (!empty($this->orderby)) { list($field, $direction) = $this->orderby; $column = array(); foreach ($this->source as $key => $row) { From 096d0fac962006792151f1eed23a223d4f68a41e Mon Sep 17 00:00:00 2001 From: Oxid3 Date: Thu, 5 Dec 2019 16:33:33 +0000 Subject: [PATCH 2/2] Update DataSet.php Fixing mistake --- src/DataSet.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/DataSet.php b/src/DataSet.php index 499d3e85..78b8539d 100644 --- a/src/DataSet.php +++ b/src/DataSet.php @@ -184,7 +184,7 @@ public function build($rowproc = null) // Calculate page variable. // $limit is set to only export a subset - if (!empty($this->limit)) { + if (isset($this->limit)) { $limit = $this->limit; $current_page = $this->url->value('page'.$this->cid, 0); $offset = (max($current_page-1,0)) * $limit; @@ -267,7 +267,7 @@ public function build($rowproc = null) case "query": case "model": //orderby - if (isset($this->orderby)) { + if (!empty($this->orderby)) { $this->query = $this->query->orderBy($this->orderby[0], $this->orderby[1]); }