PageRenderTime 36ms CodeModel.GetById 12ms RepoModel.GetById 0ms 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
Possible License(s): GPL-2.0, Apache-2.0, BSD-3-Clause, LGPL-2.1
  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. * Handles AJAX requests
  12. *
  13. * @package setup
  14. */
  15. /* do a little bit of environment cleanup if possible */
  16. @ini_set('magic_quotes_runtime',0);
  17. @ini_set('magic_quotes_sybase',0);
  18. @ini_set('opcache.revalidate_freq', 0);
  19. /* start session */
  20. session_start();
  21. /* set error reporting */
  22. error_reporting(E_ALL & ~E_NOTICE);
  23. $setupPath= strtr(realpath(dirname(__DIR__)), '\\', '/') . '/';
  24. define('MODX_SETUP_PATH', $setupPath);
  25. $installPath= strtr(realpath(dirname(dirname(__DIR__))), '\\', '/') . '/';
  26. define('MODX_INSTALL_PATH', $installPath);
  27. if (!@include(MODX_SETUP_PATH . 'includes/config.core.php')) die('Error loading core files!');
  28. require_once MODX_CORE_PATH . 'xpdo/xpdo.class.php';
  29. require_once MODX_SETUP_PATH . 'includes/modinstall.class.php';
  30. $install = new modInstall();
  31. $install->getService('lexicon','modInstallLexicon');
  32. $install->lexicon->load('default');
  33. $install->getService('request','request.modInstallConnectorRequest');
  34. $install->request->handle();
  35. @session_write_close();
  36. exit();