BUGFIX: Removed unnecessary '?' from report URLs when there are no search criteria (from r96052)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.4@98182 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2010-02-04 04:51:50 +00:00
parent 16162517b3
commit a78dee1362

View File

@ -162,7 +162,9 @@ class ReportAdmin extends LeftAndMain {
unset($filteredCriteria[$notAParam]); unset($filteredCriteria[$notAParam]);
} }
$form->setFormAction($this->Link() . '/EditForm?' . http_build_query($filteredCriteria)); $formLink = $this->Link() . '/EditForm';
if($filteredCriteria) $formLink .= '?' . http_build_query($filteredCriteria);
$form->setFormAction($formLink);
$form->setTemplate('ReportAdminForm'); $form->setTemplate('ReportAdminForm');
return $form; return $form;