diff --git a/CRM/Case/Audit/Audit.php b/CRM/Case/Audit/Audit.php index 114822c80a06..620ef00941de 100644 --- a/CRM/Case/Audit/Audit.php +++ b/CRM/Case/Audit/Audit.php @@ -221,25 +221,20 @@ public function compareActivities($a, $b) { * @param string $xmlString * @param int $clientID * @param int $caseID - * @param bool $printReport * * @return mixed */ - public static function run($xmlString, $clientID, $caseID, $printReport = FALSE) { + public static function run($xmlString, $clientID, $caseID) { $audit = new CRM_Case_Audit_Audit($xmlString, 'audit.conf.xml'); - $activities = $audit->getActivities($printReport); + $activities = $audit->getActivities(TRUE); $template = CRM_Core_Smarty::singleton(); $template->assign_by_ref('activities', $activities); - if ($printReport) { - $reportDate = CRM_Utils_Date::customFormat(date('Y-m-d H:i')); - $template->assign('reportDate', $reportDate); - $contents = $template->fetch('CRM/Case/Audit/Report.tpl'); - } - else { - $contents = $template->fetch('CRM/Case/Audit/Audit.tpl'); - } + $reportDate = CRM_Utils_Date::customFormat(date('Y-m-d H:i')); + $template->assign('reportDate', $reportDate); + $contents = $template->fetch('CRM/Case/Audit/Report.tpl'); + return $contents; } diff --git a/CRM/Case/XMLProcessor/Report.php b/CRM/Case/XMLProcessor/Report.php index 219157356119..183aa0bf93f7 100644 --- a/CRM/Case/XMLProcessor/Report.php +++ b/CRM/Case/XMLProcessor/Report.php @@ -984,7 +984,7 @@ public static function printCaseReport() { $params, $report ); - $printReport = CRM_Case_Audit_Audit::run($contents, $clientID, $caseID, TRUE); + $printReport = CRM_Case_Audit_Audit::run($contents, $clientID, $caseID); echo $printReport; CRM_Utils_System::civiExit(); }