Index: branches/5.2.x/core/kernel/session/inp_session.php =================================================================== diff -u -N -r14244 -r14628 --- branches/5.2.x/core/kernel/session/inp_session.php (.../inp_session.php) (revision 14244) +++ branches/5.2.x/core/kernel/session/inp_session.php (.../inp_session.php) (revision 14628) @@ -1,6 +1,6 @@ SessionTimeout = $this->Application->ConfigValue('SessionTimeout'); @@ -24,40 +32,49 @@ $this->SetCookiePath($path); $cookie_name = $this->Application->ConfigValue('SessionCookieName'); - if (!$cookie_name) { + + if ( !$cookie_name ) { $cookie_name = 'sid'; } $admin_session = ($this->Application->isAdmin && $special !== 'front') || ($special == 'admin'); - if ($admin_session) { + if ( $admin_session ) { $cookie_name = 'adm_' . $cookie_name; } $this->SetCookieName($cookie_name); - $this->SetCookieDomain(SERVER_NAME); - if ($admin_session) { + if ( $admin_session ) { $mode = self::smAUTO; } - elseif (defined('IS_INSTALL') && IS_INSTALL) { + elseif ( defined('IS_INSTALL') && IS_INSTALL ) { $mode = self::smCOOKIES_ONLY; } else { $ses_mode = $this->Application->ConfigValue('CookieSessions'); - if ($ses_mode == 2) $mode = self::smAUTO; - if ($ses_mode == 1) $mode = self::smCOOKIES_ONLY; - if ($ses_mode == 0) $mode = self::smGET_ONLY; + if ( $ses_mode == 2 ) { + $mode = self::smAUTO; + } + elseif ( $ses_mode == 1 ) { + $mode = self::smCOOKIES_ONLY; + } + elseif ( $ses_mode == 0 ) { + $mode = self::smGET_ONLY; + } + else { + $mode = self::smAUTO; + } } $this->SetMode($mode); parent::Init($prefix, $special); - if (!$this->Application->isAdmin && $this->GetField('PortalUserId') <= 0) { - $group_list = $this->Application->ConfigValue('User_GuestGroup').','.$this->Application->ConfigValue('User_LoggedInGroup'); + if ( !$this->Application->isAdmin && $this->GetField('PortalUserId') <= 0 ) { + $group_list = $this->Application->ConfigValue('User_GuestGroup') . ',' . $this->Application->ConfigValue('User_LoggedInGroup'); $this->SetField('GroupId', $this->Application->ConfigValue('User_GuestGroup')); $this->SetField('GroupList', $group_list); }