From 40592031ff198db1a5b81f956409e2147f9257d7 Mon Sep 17 00:00:00 2001 From: Mark Stephens Date: Mon, 20 Sep 2010 03:54:52 +0000 Subject: [PATCH] BUGFIX: Submissions were exported in implied ID order, which is not guaranteed on all DB engines, esp postgres, so put in explicit order --- code/submissions/SubmittedFormReportField.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/submissions/SubmittedFormReportField.php b/code/submissions/SubmittedFormReportField.php index 50a2326..e9292b7 100755 --- a/code/submissions/SubmittedFormReportField.php +++ b/code/submissions/SubmittedFormReportField.php @@ -86,7 +86,7 @@ class SubmittedFormReportField extends FormField { $csvHeaderNames = array(); $csvHeaderTitle = array(); - $submissions = $udf->Submissions(); + $submissions = $udf->Submissions("", "\"ID\""); if($submissions && $submissions->exists()) { @@ -103,7 +103,7 @@ class SubmittedFormReportField extends FormField { FROM \"SubmittedFormField\" LEFT JOIN \"SubmittedForm\" ON \"SubmittedForm\".\"ID\" = \"SubmittedFormField\".\"ParentID\" WHERE \"SubmittedFormField\".\"ParentID\" IN (" . implode(',', $inClause) . ") - GROUP BY \"Name\" + GROUP BY \"SubmittedFormField\".\"ID\",\"Name\",\"Title\" ORDER BY \"SubmittedFormField\".\"ID\" ");