CRM-12101
[civicrm-core.git] / CRM / Report / Utils / Report.php
index 9f8945d500a4b65c081cfa383695d55084451dfa..1a7d6214ca8c52b3958851a01eeaf9a7483a97fc 100644 (file)
@@ -103,10 +103,10 @@ WHERE  TRIM(BOTH '/' FROM CONCAT(report_id, '/', name)) = %1";
   static function getNextUrl($urlValue, $query = 'reset=1', $absolute = FALSE, $instanceID = NULL, $drilldownReport = array()) {
     if ($instanceID) {
       $drilldownInstanceID = false;
-      if (array_key_exists($urlValue, $drilldownReport)) 
+      if (array_key_exists($urlValue, $drilldownReport))
         $drilldownInstanceID = CRM_Core_DAO::getFieldValue('CRM_Report_DAO_Instance', $instanceID, 'drilldown_id', 'id');
 
-      if (!$drilldownInstanceID) 
+      if (!$drilldownInstanceID)
         $drilldownInstanceID = self::getInstanceIDForValue($urlValue);
 
       if ($drilldownInstanceID) {
@@ -359,11 +359,15 @@ WHERE  inst.report_id = %1";
 
       $wrapper = new CRM_Utils_Wrapper();
       $arguments['urlToSession'] = array(
-        array('urlVar' => 'instanceId',
+        array(
+          'urlVar' => 'instanceId',
           'type' => 'Positive',
           'sessionVar' => 'instanceId',
           'default' => 'null',
-        ));
+        ),
+      );
+      $arguments['ignoreKey'] = TRUE;
+
       $messages[] = $wrapper->run($templateInfo['name'], NULL, $arguments);
     }
     else {
@@ -465,7 +469,7 @@ WHERE  inst.report_id = %1";
 
   static function getInstanceList($reportUrl) {
     static $instanceDetails = array();
-    
+
     if (!array_key_exists($reportUrl, $instanceDetails )) {
       $instanceDetails[$reportUrl] = array();