From: Andrew Hunt Date: Thu, 3 Dec 2015 17:46:36 +0000 (-0500) Subject: CRM-17658 Reports: add new region for default report HTML header X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=acb18c874816625b3ca9fe3b468fc87381384c9f;p=civicrm-core.git CRM-17658 Reports: add new region for default report HTML header --- diff --git a/CRM/Report/Form/Instance.php b/CRM/Report/Form/Instance.php index 04e4a1dd49..b812e069b8 100644 --- a/CRM/Report/Form/Instance.php +++ b/CRM/Report/Form/Instance.php @@ -222,11 +222,18 @@ class CRM_Report_Form_Instance { } $config = CRM_Core_Config::singleton(); + + // Add a special region for the default HTML header of printed reports. It + // won't affect reports with customized headers, just ones with the default. + $printHeaderRegion = CRM_Core_Region::instance('default-report-header', FALSE); + $htmlHeader = ($printHeaderRegion) ? $printHeaderRegion->render('', FALSE) : ''; + $defaults['report_header'] = $report_header = " CiviCRM Report + {$htmlHeader}
";