CRM-16926 complete recurring transactions when payment_status_id = 1,
[civicrm-core.git] / extern / rest.php
index 57863642f47bc3c30bf784083200282a8b249e62..6f9303c3cd3408f63958b46f05979640e22c8267 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.5                                                |
+ | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
- | 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        |
  +--------------------------------------------------------------------+
-*/
+ */
 
 require_once '../civicrm.config.php';
-require_once 'CRM/Core/Config.php';
 $config = CRM_Core_Config::singleton();
 
 session_start();
-require_once 'CRM/Utils/REST.php';
 $rest = new CRM_Utils_REST();
 
-if (isset($_GET['json']) && $_GET['json']) {
-  header('Content-Type: text/javascript');
-}
-else {
+// Json-appropriate header will be set by CRM_Utils_Rest
+// But we need to set header here for non-json
+if (empty($_GET['json'])) {
   header('Content-Type: text/xml');
 }
 echo $rest->bootAndRun();