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=78b06a37f393254eb092bcd61b1a62876e322de1;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 040de0f27a..69c6efa0de 100644 --- a/CRM/Report/Form/Instance.php +++ b/CRM/Report/Form/Instance.php @@ -227,11 +227,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}
";