PageRenderTime 165ms CodeModel.GetById 160ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/setup/processors/connector.php

http://github.com/modxcms/revolution
PHP | 42 lines | 20 code | 6 blank | 16 comment | 1 complexity | 63395597282563986417127b6599b6c7 MD5 | raw file
 1<?php
 2/*
 3 * This file is part of MODX Revolution.
 4 *
 5 * Copyright (c) MODX, LLC. All Rights Reserved.
 6 *
 7 * For complete copyright and license information, see the COPYRIGHT and LICENSE
 8 * files found in the top-level directory of this distribution.
 9 */
10
11/**
12 * Handles AJAX requests
13 *
14 * @package setup
15 */
16/* do a little bit of environment cleanup if possible */
17@ini_set('magic_quotes_runtime',0);
18@ini_set('magic_quotes_sybase',0);
19@ini_set('opcache.revalidate_freq', 0);
20
21/* start session */
22session_start();
23
24/* set error reporting */
25error_reporting(E_ALL & ~E_NOTICE);
26
27$setupPath= strtr(realpath(dirname(__DIR__)), '\\', '/') . '/';
28define('MODX_SETUP_PATH', $setupPath);
29$installPath= strtr(realpath(dirname(dirname(__DIR__))), '\\', '/') . '/';
30define('MODX_INSTALL_PATH', $installPath);
31
32if (!@include(MODX_SETUP_PATH . 'includes/config.core.php')) die('Error loading core files!');
33require_once MODX_CORE_PATH . 'xpdo/xpdo.class.php';
34require_once MODX_SETUP_PATH . 'includes/modinstall.class.php';
35
36$install = new modInstall();
37$install->getService('lexicon','modInstallLexicon');
38$install->lexicon->load('default');
39$install->getService('request','request.modInstallConnectorRequest');
40$install->request->handle();
41@session_write_close();
42exit();