/** * @static * @return bool */ public static function initConfiguration() { // init configuration try { $conf = Pimcore_Config::getSystemConfig(); $debug = self::inDebugMode(); if (!defined("PIMCORE_DEBUG")) { define("PIMCORE_DEBUG", $debug); } if (!defined("PIMCORE_DEVMODE")) { define("PIMCORE_DEVMODE", (bool) $conf->general->devmode); } // check for output-cache settings // if a lifetime for the output cache is specified then the cache tag "output" will be ignored on clear $cacheLifetime = (int) $conf->cache->lifetime; if (!empty($cacheLifetime)) { Pimcore_Model_Cache::addIgnoredTagOnClear("output"); } return true; } catch (Exception $e) { $m = "Couldn't load system configuration"; Logger::err($m); //@TODO check here for /install otherwise exit here } if (!defined("PIMCORE_DEBUG")) { define("PIMCORE_DEBUG", true); } if (!defined("PIMCORE_DEVMODE")) { define("PIMCORE_DEVMODE", false); } }
/** * @static * @return bool */ public static function initConfiguration() { // init configuration try { $conf = Pimcore_Config::getSystemConfig(); // set timezone if ($conf instanceof Zend_Config) { if ($conf->general->timezone) { date_default_timezone_set($conf->general->timezone); } } $debug = self::inDebugMode(); if (!defined("PIMCORE_DEBUG")) { define("PIMCORE_DEBUG", $debug); } if (!defined("PIMCORE_DEVMODE")) { define("PIMCORE_DEVMODE", (bool) $conf->general->devmode); } // check for output-cache settings // if a lifetime for the output cache is specified then the cache tag "output" will be ignored on clear $cacheLifetime = (int) $conf->cache->lifetime; if (!empty($cacheLifetime)) { Pimcore_Model_Cache::addIgnoredTagOnClear("output"); } return true; } catch (Exception $e) { $m = "Couldn't load system configuration"; Logger::err($m); //@TODO check here for /install otherwise exit here } if (!defined("PIMCORE_DEBUG")) { define("PIMCORE_DEBUG", true); } if (!defined("PIMCORE_DEVMODE")) { define("PIMCORE_DEVMODE", false); } // custom error logging in DEVMODE if (PIMCORE_DEVMODE) { error_reporting(E_ALL ^ E_NOTICE | E_STRICT); ini_set('error_log', PIMCORE_LOG_DIRECTORY . '/php.log'); } }