BUGFIX: Fixed report pagination, with or without search params (from r95555)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.4@98168 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2010-02-04 04:45:53 +00:00
parent 5fdc153a19
commit 61a0240a54

View File

@ -205,7 +205,15 @@ class ReportAdmin extends LeftAndMain {
$form = new Form($this, 'EditForm', $fields, $actions);
$form->loadDataFrom($_REQUEST);
$form->loadDataFrom($_GET);
// Include search criteria in the form action so that pagination works
$filteredCriteria = array_merge($_GET, $_POST);
foreach(array('ID','url','ajax','ctf','update','action_updatereport','SecurityID') as $notAParam) {
unset($filteredCriteria[$notAParam]);
}
$form->setFormAction($this->Link() . '/EditForm?' . http_build_query($filteredCriteria));
return $form;
}