<?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();