From d0c261ff322707c8100e0c5bd38aed2ba0bca47f Mon Sep 17 00:00:00 2001 From: Nicolas Le Goff Date: Mon, 22 Apr 2013 12:38:34 +0200 Subject: [PATCH] Fix #1155 Export CSV truncated --- lib/classes/module/report/sqldownload.class.php | 8 +++++--- lib/classes/module/report/sqlquestion.class.php | 3 ++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/classes/module/report/sqldownload.class.php b/lib/classes/module/report/sqldownload.class.php index a1b446f390..f8959738bb 100644 --- a/lib/classes/module/report/sqldownload.class.php +++ b/lib/classes/module/report/sqldownload.class.php @@ -70,8 +70,8 @@ class module_report_sqldownload extends module_report_sql implements module_repo $stmt->execute($this->params); $this->total_row = $stmt->rowCount(); $stmt->closeCursor(); - - $this->sql .= $this->filter->getLimitFilter() ? : ''; + if ($this->enable_limit) + $this->sql .= $this->filter->getLimitFilter() ? : ''; } else { $name = $this->groupby; $field = $this->getTransQuery($this->groupby); @@ -144,7 +144,9 @@ class module_report_sqldownload extends module_report_sql implements module_repo $this->total = $stmt->rowCount(); $stmt->closeCursor(); - $this->sql .= $this->filter->getLimitFilter() ? : ''; + if ($this->enable_limit) + $this->sql .= $this->filter->getLimitFilter() ? : ''; + } return $this; diff --git a/lib/classes/module/report/sqlquestion.class.php b/lib/classes/module/report/sqlquestion.class.php index 0e85f93f54..91fb69d235 100644 --- a/lib/classes/module/report/sqlquestion.class.php +++ b/lib/classes/module/report/sqlquestion.class.php @@ -56,7 +56,8 @@ class module_report_sqlquestion extends module_report_sql implements module_repo $this->total_row = $stmt->rowCount(); $stmt->closeCursor(); - $this->sql .= $this->filter->getLimitFilter() ? : ''; + if ($this->enable_limit) + $this->sql .= $this->filter->getLimitFilter() ? : ''; } else { $this->sql = " SELECT