Merge pull request #4932 from totten/master-batch0-g
[civicrm-core.git] / CRM / Event / Page / AJAX.php
index 355c473f74c1f7f0f2d08de0de58c85c52ac3793..45ba896cbd87bf023bfb49b37676ec95e5b5f501 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.5                                                |
+ | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
 class CRM_Event_Page_AJAX {
 
   /**
-   * Function for building EventFee combo box
+   * Building EventFee combo box
    * FIXME: This ajax callback could be eliminated in favor of an entityRef field but the priceFieldValue api doesn't currently support filtering on entity_table
    */
-  function eventFee() {
+  public function eventFee() {
     $name = trim(CRM_Utils_Type::escape($_GET['term'], 'String'));
 
     if (!$name) {
@@ -64,9 +64,6 @@ GROUP BY cv.label";
     while ($dao->fetch()) {
       $results[] = array('id' => $dao->id, 'text' => $dao->label);
     }
-    echo json_encode($results);
-    CRM_Utils_System::civiExit();
+    CRM_Utils_JSON::output($results);
   }
-
 }
-