Fix issue with reports creating invalid URLs when updated.
authorAnthony Nemirovsky <anemirovsky@giantrabbit.com>
Sat, 16 Aug 2014 00:39:34 +0000 (17:39 -0700)
committerAnthony Nemirovsky <anemirovsky@giantrabbit.com>
Sat, 16 Aug 2014 00:39:34 +0000 (17:39 -0700)
When updating a report, if the Report Settings is set to "Include Report in
Navigation Menu", the navigation url that is created is formatted like
/civicrm/report/instance/1_reset_1, which is incorrect. The correct URL
should be /civicrm/report/instance/1?reset=1.

CRM/Report/BAO/ReportInstance.php

index 55b36f3a4b8f312d25a35453238cbe5444b2a85a..e21a6806247520387a59d485c83544990b513136 100644 (file)
@@ -191,7 +191,7 @@ class CRM_Report_BAO_ReportInstance extends CRM_Report_DAO_ReportInstance {
       if (empty($params['id']) && empty($params['instance_id']) && !empty($navigationParams['id'])) {
         unset($navigationParams['id']);
       }
-      $navigationParams['url'] = "civicrm/report/instance/{$instance->id}&reset=1";
+      $navigationParams['url'] = "civicrm/report/instance/{$instance->id}?reset=1";
       $navigation = CRM_Core_BAO_Navigation::add($navigationParams);
 
       if (!empty($navigationParams['is_active'])) {