protected static function loadConfig() { if (self::$cookiePrefix !== null) { return; } $config = vB5_Config::instance(); // these could potentially all be config options self::$enabled = $config->cookie_enabled !== false; self::$cookiePrefix = $config->cookie_prefix; $options = vB5_Template_Options::instance(); self::$path = $options->get('options.cookiepath'); self::$domain = $options->get('options.cookiedomain'); self::$secure = ((isset($_SERVER['SERVER_PORT']) and 443 === intval($_SERVER['SERVER_PORT']) or isset($_SERVER['HTTPS']) and $_SERVER['HTTPS'] and $_SERVER['HTTPS'] != 'off') and (isset($url['scheme']) and $url['scheme'] == 'https')); }