setFormatter(new SS_CustomLogErrorEmailFormatter()); SS_Log::add_writer($email_log_writer, SS_Log::ERR, '<='); // Default From address for email global $email_from; Config::inst()->update('Email', 'admin_email', $email_from); //Register Shortcodes ShortcodeParser::get()->register('Sched',array('Page','SchedShortCodeHandler')); ShortcodeParser::get()->register('outlink',array('Page','ExternalLinkShortCodeHandler')); //cache configuration /* SS_Cache::add_backend('two-level', 'Two-Levels', array( 'slow_backend' => 'File', 'fast_backend' => 'Apc', 'slow_backend_options' => array('cache_dir' => TEMP_FOLDER . DIRECTORY_SEPARATOR . 'cache') )); SS_Cache::pick_backend('two-level', 'any', 10); // No need for special backend for aggregate - TwoLevels with a File slow backend supports tags */ SS_Cache::add_backend('file-level', 'File', array('cache_dir' => TEMP_FOLDER . DIRECTORY_SEPARATOR . 'cache')); SS_Cache::pick_backend('file-level', 'any', 10); SS_Cache::set_cache_lifetime($for = 'cache_entity_count', $lifetime = 3600, $priority = 100); //entity counter extension Object::add_extension('HomePage_Controller', 'EntityCounter'); Object::add_extension('AnniversaryPage_Controller', 'EntityCounter'); Object::add_extension('Group', 'GroupDecorator'); Object::add_extension('SecurityAdmin', 'SecurityAdminExtension'); //Force cache to flush on page load if in Dev mode (prevents needing ?flush=1 on the end of a URL) if (Director::isDev()) { SSViewer::flush_template_cache(); //Set default login Security::setDefaultAdmin('admin','pass'); } //sangria configuration Object::add_extension('SangriaPage_Controller', 'SangriaPageDeploymentExtension'); Object::add_extension('SangriaPage_Controller', 'SangriaPageSurveyDetailsExtension'); Object::add_extension('SangriaPage_Controller', 'SangriaPageStandardizeOrgNamesExtension'); Object::add_extension('SangriaPage_Controller', 'SangriaPageViewCurrentStoriesExtension'); Object::add_extension('SangriaPage_Controller', 'SangriaPageExportDataExtension'); Object::add_extension('SangriaPage_Controller', 'SangriaPageViewSpeakingSubmissionsExtension'); Object::add_extension('SangriaPage_Controller', 'SangriaSetCategorySponsorsExtension'); Object::add_extension('SangriaPage_Controller', 'SangriaPageInvolvementTypeExtension'); HTTP::set_cache_age(0);