/**
 *
 * @package CRM
 * @copyright CiviCRM LLC (c) 2004-2012
 * $Id$
 *
 */
function run()
{
    session_start();
    require_once '../../civicrm.config.php';
    require_once 'CRM/Core/Config.php';
    $config = CRM_Core_Config::singleton();
    // this does not return on failure
    // CRM_Utils_System::authenticateScript( true );
    $params = array();
    require_once 'CRM/Utils/Migrate/ExportJSON.php';
    $export = new CRM_Utils_Migrate_ExportJSON($params);
    $export->run('/tmp/export.json');
}
示例#2
0
/**
 *
 * @package CRM
 * @copyright CiviCRM LLC (c) 2004-2016
 */
function run()
{
    session_start();
    require_once '../../civicrm.config.php';
    require_once 'CRM/Core/Config.php';
    $config = CRM_Core_Config::singleton();
    // this does not return on failure
    CRM_Utils_System::authenticateScript(TRUE);
    if (!CRM_Core_Permission::check('administer CiviCRM')) {
        CRM_Utils_System::authenticateAbort("User does not have required permission (administer CiviCRM).\n", TRUE);
    }
    $params = array();
    require_once 'CRM/Utils/Migrate/ExportJSON.php';
    $export = new CRM_Utils_Migrate_ExportJSON($params);
    $export->run('/tmp/export.json');
}