Ejemplo n.º 1
0
Configure::write('Rating.time_limit', '4 weeks');
Configure::write('Reviews.auto_moderate', true);
/**
 * @brief get the configuration values from cache
 *
 * If they are available, set them to the Configure object else run the
 * Event to get the values from all the plugins and cache them
 */
$cachedConfigs = Cache::read('global_configs');
if (!empty($cachedConfigs)) {
    foreach ($cachedConfigs as $k => $v) {
        Configure::write($k, $v);
    }
}
unset($cacheEngine, $cachedConfigs);
InfinitasPlugin::loadCore();
EventCore::trigger(new StdClass(), 'requireLibs');
/**
 * @todo cake2.0
 * Cache::write('global_configs', Configure::getInstance());
 */
configureCache(EventCore::trigger(new StdClass(), 'setupCache'));
InfinitasPlugin::loadInstalled();
/**
 * Make sure the json defines are loaded.
 */
if (!defined('JSON_ERROR_NONE')) {
    define('JSON_ERROR_NONE', 0);
}
if (!defined('JSON_ERROR_DEPTH')) {
    define('JSON_ERROR_DEPTH', 1);