From 6001af1fcbbc0387ed360feafba3153a3f74932a Mon Sep 17 00:00:00 2001 From: "Donald A. Lobo" Date: Tue, 12 Mar 2013 13:14:56 -0700 Subject: [PATCH] CRM-12101 --- CRM/Report/Utils/Report.php | 14 +++++++++----- CRM/Utils/Wrapper.php | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/CRM/Report/Utils/Report.php b/CRM/Report/Utils/Report.php index 9f8945d500..1a7d6214ca 100644 --- a/CRM/Report/Utils/Report.php +++ b/CRM/Report/Utils/Report.php @@ -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(); diff --git a/CRM/Utils/Wrapper.php b/CRM/Utils/Wrapper.php index bff98ed5db..664f978b3e 100644 --- a/CRM/Utils/Wrapper.php +++ b/CRM/Utils/Wrapper.php @@ -62,7 +62,7 @@ class CRM_Utils_Wrapper { * * @return none. * @access public - */ + */ function run($formName, $formLabel = NULL, $arguments = NULL) { if (is_array($arguments)) { $mode = CRM_Utils_Array::value('mode', $arguments); -- 2.25.1