MINOR: sort submissions based on newer ones first

This commit is contained in:
Will Rossiter 2009-07-22 03:34:27 +00:00
parent 8b84f9caa9
commit c7b6639d1e
1 changed files with 1 additions and 1 deletions

View File

@ -21,7 +21,7 @@ class SubmittedFormReportField extends FormField {
$pageStart = isset($_REQUEST['start']) && is_numeric($_REQUEST['start']) ? $_REQUEST['start'] : 0;
$pageLength = 10;
$items = $this->form->getRecord()->getComponents('Submissions', null, null, null, "$pageStart,$pageLength");
$items = $this->form->getRecord()->getComponents('Submissions', null, "Created DESC", null, "$pageStart,$pageLength");
$formId = $this->form->getRecord()->ID;
foreach(DB::query("SELECT COUNT(*) AS CountRows FROM SubmittedForm WHERE ParentID = $formId") as $r) $totalCount = $r['CountRows'];