Ian province abbreviation patch - issue 724
[civicrm-core.git] / CRM / Mailing / Page / Preview.php
index b08987e3e3e72d246ef01368c8fb2e7bc2082e08..0277650c0858df187b723644623601bf38d20e83 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.6                                                |
+ | CiviCRM version 4.7                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014                                |
+ | Copyright CiviCRM LLC (c) 2004-2015                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
  | GNU Affero General Public License or the licensing of CiviCRM,     |
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
-*/
+ */
 
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
  * $Id$
  *
  */
@@ -43,7 +43,7 @@ class CRM_Mailing_Page_Preview extends CRM_Core_Page {
    *
    * @return void
    */
-  function run() {
+  public function run() {
 
     $session = CRM_Core_Session::singleton();
 
@@ -92,14 +92,14 @@ class CRM_Mailing_Page_Preview extends CRM_Core_Page {
     );
 
     if ($type == 'html') {
-      header('Content-Type: text/html; charset=utf-8');
+      CRM_Utils_System::setHttpHeader('Content-Type', 'text/html; charset=utf-8');
       print $mime->getHTMLBody();
     }
     else {
-      header('Content-Type: text/plain; charset=utf-8');
+      CRM_Utils_System::setHttpHeader('Content-Type', 'text/plain; charset=utf-8');
       print $mime->getTXTBody();
     }
     CRM_Utils_System::civiExit();
   }
-}
 
+}