/** * Constructor. * * @access protected */ protected function __construct() { // Init Config Config::init(); // Turn on output buffering ob_start(); // Display Errors Config::get('system.errors.display') and error_reporting(-1); // Set internal encoding function_exists('mb_language') and mb_language('uni'); function_exists('mb_regex_encoding') and mb_regex_encoding(Config::get('system.charset')); function_exists('mb_internal_encoding') and mb_internal_encoding(Config::get('system.charset')); // Set default timezone date_default_timezone_set(Config::get('system.timezone')); // Start the session Session::start(); // Init Cache Cache::init(); // Init Plugins Plugins::init(); // Init Blocks Blocks::init(); // Init Pages Pages::init(); // Flush (send) the output buffer and turn off output buffering ob_end_flush(); }
require_once LIB_PATH . 'osclass/alerts.php'; require_once LIB_PATH . 'osclass/frm/Form.form.class.php'; require_once LIB_PATH . 'osclass/frm/Page.form.class.php'; require_once LIB_PATH . 'osclass/frm/Category.form.class.php'; require_once LIB_PATH . 'osclass/frm/Item.form.class.php'; require_once LIB_PATH . 'osclass/frm/Contact.form.class.php'; require_once LIB_PATH . 'osclass/frm/Comment.form.class.php'; require_once LIB_PATH . 'osclass/frm/User.form.class.php'; require_once LIB_PATH . 'osclass/frm/Language.form.class.php'; require_once LIB_PATH . 'osclass/frm/SendFriend.form.class.php'; require_once LIB_PATH . 'osclass/frm/Alert.form.class.php'; require_once LIB_PATH . 'osclass/frm/Field.form.class.php'; require_once LIB_PATH . 'osclass/frm/Admin.form.class.php'; require_once LIB_PATH . 'osclass/functions.php'; define('__OSC_LOADED__', true); Plugins::init(); // init Rewrite class only iif it's the frontend if (!OC_ADMIN) { Rewrite::newInstance()->init(); } // Moved from BaseModel, since we need some session magic on index.php ;) Session::newInstance()->session_start(); if (osc_timezone() != '') { date_default_timezone_set(osc_timezone()); } function osc_show_maintenance() { if (defined('__OSC_MAINTENANCE__')) { ?> <div id="maintenance" name="maintenance"> <?php
static function reload() { Preference::newInstance()->toArray(); Plugins::init(); }