Merge pull request #7608 from colemanw/CRM-16353
[civicrm-core.git] / CRM / Custom / Page / AJAX.php
index b4bc680cb04dab4ed46c3ad98a640e70a509c134..bdf0ec3d50f586ea9b36498ac6fc2bcade9b8e85 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.6                                                |
+ | CiviCRM version 4.7                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2015                                |
  +--------------------------------------------------------------------+
  * This class contains the functions that are called using AJAX (jQuery)
  */
 class CRM_Custom_Page_AJAX {
+
   /**
-   * Get list of options.
-   *
+   * This function uses the deprecated v1 datatable api and needs updating. See CRM-16353.
+   * @deprecated
    */
   public static function getOptionList() {
     $params = $_REQUEST;
@@ -62,7 +63,7 @@ class CRM_Custom_Page_AJAX {
       'class',
     );
 
-    header('Content-Type: application/json');
+    CRM_Utils_System::setHttpHeader('Content-Type', 'application/json');
     echo CRM_Utils_JSON::encodeDataTableSelector($options, $sEcho, $iTotal, $iFilteredTotal, $selectorElements);
     CRM_Utils_System::civiExit();
   }