FIX Fallback for Session.cookie_path

Regression introduced by Config API static changes.
Effectively meant that you can no longer log in to the CMS
since the cookie path is set for each URL individually...
This commit is contained in:
Ingo Schommer 2013-03-25 23:03:34 +01:00
parent 7470f5e0b6
commit 07d99a5136

View File

@ -497,6 +497,7 @@ class Session {
*/
public static function start($sid = null) {
$path = Config::inst()->get('Session', 'cookie_path');
if(!$path) $path = Director::baseURL();
$domain = Config::inst()->get('Session', 'cookie_domain');
$secure = Config::inst()->get('Session', 'cookie_secure');
$session_path = Config::inst()->get('Session', 'session_store_path');
@ -528,6 +529,7 @@ class Session {
if(session_id()) {
if($removeCookie) {
$path = Config::inst()->get('cookie_path');
if(!$path) $path = Director::baseURL();
$domain = Config::inst()->get('cookie_domain');
$secure = Config::inst()->get('cookie_secure');