/** * Class constructor which loads the session hanlder we should use. * * @return object */ public function __construct() { if (!self::$_oObject) { $sStorage = 'phpfox.session.handler.default'; /* if (defined('PHPFOX_IS_HOSTED_SCRIPT')) { $sStorage = 'phpfox.session.handler.memcache'; } else { if (defined('PHPFOX_IS_AJAX') && PHPFOX_IS_AJAX) { $sStorage = 'phpfox.session.handler.file'; } else { if (Phpfox::getParam(array('balancer', 'enabled'))) { $sStorage = 'phpfox.session.handler.memcache'; } } } */ self::$_oObject = Phpfox::getLib($sStorage); } // return self::$_oObject; }
require_once PHPFOX_DIR_LIB_CORE . 'debug' . PHPFOX_DS . 'debug.class.php'; $handler = new Whoops\Handler\PrettyPageHandler(); $handler->setEditor('textmate'); $whoops = new Whoops\Run(); $whoops->pushHandler($handler); $whoops->register(); } PHPFOX_DEBUG ? Phpfox_Debug::start('init') : false; date_default_timezone_set('GMT'); define('PHPFOX_TIME', time()); Phpfox::getLib('setting')->set(); if (!defined('PHPFOX_NO_PLUGINS')) { Phpfox_Plugin::set(); } if (Phpfox_Request::instance()->get('ping-no-session')) { define('PHPFOX_NO_SESSION', true); define('PHPFOX_NO_APPS', true); } // Start a session if needed if (!defined('PHPFOX_NO_SESSION')) { Phpfox_Session_Handler::instance()->init(); } if (!defined('PHPFOX_NO_USER_SESSION')) { Phpfox::getService('log.session')->setUserSession(); } // check if user already verified their email if (!defined('PHPFOX_CLI') || PHPFOX_CLI != true) { Phpfox::getService('user.auth')->handleStatus(); } ($sPlugin = Phpfox_Plugin::get('init')) ? eval($sPlugin) : false; PHPFOX_DEBUG ? Phpfox_Debug::end('init') : false;