*/ session_start(); /** * Set up environment */ defined('DEBUG') || define('DEBUG', ($env = strtolower(getenv('DEBUG'))) === '1' || $env === 'true' || $env === 'on'); defined('DEPRECATION') || define('DEPRECATION', ($env = strtolower(getenv('DEPRECATION'))) === '1' || $env === 'true' || $env === 'on'); /** * Define a valid include_path */ set_include_path(implode(PS, array(ROOT_PATH . 'library', APPLICATION_PATH . 'code' . DS . 'core', APPLICATION_PATH . 'code' . DS . 'community', APPLICATION_PATH . 'code' . DS . 'local'))); require_once 'Nova.php'; /** * Zend Framework's autoloader class. * @todo: add this to Nova::app() */ require_once 'Zend/Loader/Autoloader.php'; $loader = Zend_Loader_Autoloader::getInstance(); $loader->registerNamespace('Legacies_'); $loader->registerNamespace('Nova_'); $loader->registerNamespace('Whitewashing_'); /** * Check up if the game is already installed. */ if (!file_exists(APPLICATION_PATH . 'config/local.xml')) { header('HTTP/1.1 302 Found'); header('Location: install/'); exit(0); } Nova::app()->bootstrap()->run();
* Mute the legacy coding errors reporting * @deprecated */ @ini_set('display_errors', DEBUG); /** * @var string the php extension used for the files * @deprecated */ define('PHPEXT', require 'extension.inc'); /** * @var the current game version. * @deprecated */ define('VERSION', Nova::getSingleton('core/version')->getVersion()); //FIXME $game_config = Nova::app()->getGameConfig(); $user = Nova::getSingleton('user/session')->getUser(); $lang = array(); $IsUserChecked = false; define('DEFAULT_SKINPATH', 'skins/xnova/'); define('TEMPLATE_DIR', realpath(ROOT_PATH . '/templates/')); define('TEMPLATE_NAME', 'OpenGame'); define('DEFAULT_LANG', 'fr_FR'); $debug = Nova::getSingleton('core/debug'); include ROOT_PATH . 'includes/constants.php'; include ROOT_PATH . 'includes/functions.php'; include ROOT_PATH . 'includes/unlocalised.php'; include ROOT_PATH . 'includes/todofleetcontrol.php'; include ROOT_PATH . 'language/' . DEFAULT_LANG . '/lang_info.cfg'; include ROOT_PATH . 'includes/vars.php'; include ROOT_PATH . 'db/mysql.php';