Merge remote-tracking branch 'upstream/4.5' into 4.5-master-2015-03-09-21-44-34
[civicrm-core.git] / CRM / Mailing / Page / AJAX.php
index c550fb7856e45dd45bcc689115684100817e1220..5a0fef0788c1378a0f8053f682f4477cc5a3ec8e 100644 (file)
@@ -23,7 +23,7 @@
  | GNU Affero General Public License or the licensing of CiviCRM,     |
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
-*/
+ */
 
 /**
  *
@@ -60,7 +60,7 @@ class CRM_Mailing_Page_AJAX {
   }
 
   /**
-   * Retrieve contact mailings
+   * Retrieve contact mailings.
    */
   public static function getContactMailings() {
     $contactID = CRM_Utils_Type::escape($_GET['contact_id'], 'Integer');
@@ -104,6 +104,7 @@ class CRM_Mailing_Page_AJAX {
       'links',
     );
 
+    header('Content-Type: application/json');
     echo CRM_Utils_JSON::encodeDataTableSelector($mailings, $sEcho, $iTotal, $iFilteredTotal, $selectorElements);
     CRM_Utils_System::civiExit();
   }