From a78dee1362e3d496804c4c519759b598b2da615b Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Thu, 4 Feb 2010 04:51:50 +0000 Subject: [PATCH] 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 --- code/ReportAdmin.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/ReportAdmin.php b/code/ReportAdmin.php index ce6a24c9..37650814 100755 --- a/code/ReportAdmin.php +++ b/code/ReportAdmin.php @@ -162,7 +162,9 @@ class ReportAdmin extends LeftAndMain { 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'); return $form;