diff --git a/download.php b/download.php index ff98008..0a7a691 100755 --- a/download.php +++ b/download.php @@ -1,13 +1,15 @@ getIni(); +$ini = require_once 'init.php'; $theme = $ini['general']['theme']; $class = isset($_REQUEST['class']) ? $_REQUEST['class'] : ''; diff --git a/init.php b/init.php index a6357b7..48f91bc 100755 --- a/init.php +++ b/init.php @@ -1,47 +1,26 @@ register(); - $loader = require 'vendor/autoload.php'; - $loader->register(); +// read configurations +$ini = parse_ini_file('app/config/application.ini', true); +date_default_timezone_set($ini['general']['timezone']); +AdiantiCoreTranslator::setLanguage($ini['general']['language']); +ApplicationTranslator::setLanguage($ini['general']['language']); +AdiantiApplicationConfig::load($ini); - // read configurations - $this->ini = parse_ini_file('app/config/application.ini', true); - date_default_timezone_set($this->ini['general']['timezone']); - AdiantiCoreTranslator::setLanguage($this->ini['general']['language']); - ApplicationTranslator::setLanguage($this->ini['general']['language']); - AdiantiApplicationConfig::load($this->ini); +// define constants +define('APPLICATION_NAME', $ini['general']['application']); +define('OS', strtoupper(substr(PHP_OS, 0, 3))); +define('PATH', dirname(__FILE__)); +define('LANG', $ini['general']['language']); - // define constants - define('APPLICATION_NAME', $this->ini['general']['application']); - define('OS', strtoupper(substr(PHP_OS, 0, 3))); - define('PATH', dirname(__FILE__)); - define('LANG', $this->ini['general']['language']); - - if (version_compare(PHP_VERSION, '5.5.0') == -1) { - die(AdiantiCoreTranslator::translate('The minimum version required for PHP is ^1', '5.5.0')); - } - } - - public function getIni() - { - return $this->ini; - } +if (version_compare(PHP_VERSION, '5.5.0') == -1) { + die(AdiantiCoreTranslator::translate('The minimum version required for PHP is ^1', '5.5.0')); } - +return $ini;