Index: trunk/core/units/general/inp_ses_storage.php =================================================================== diff -u -r3021 -r3031 --- trunk/core/units/general/inp_ses_storage.php (.../inp_ses_storage.php) (revision 3021) +++ trunk/core/units/general/inp_ses_storage.php (.../inp_ses_storage.php) (revision 3031) @@ -5,26 +5,27 @@ function Init($prefix,$special) { $this->SessionTimeout = $this->Application->ConfigValue('SessionTimeout'); - if (BASE_PATH == '') { - $path = '/'; + + $path = (BASE_PATH == '') ? '/' : BASE_PATH; + if ( $this->Application->IsAdmin() ) $path = rtrim($path, '/').'/admin'; + $this->SetCookiePath($path); + + $this->SetCookieName( $this->Application->ConfigValue('SessionCookieName') ); + $this->SetCookieDomain(SERVER_NAME); + + if( $this->Application->IsAdmin() ) + { + $mode = smAUTO; } - else { - $path = BASE_PATH; - } - if ( defined('ADMIN') && ADMIN ) + else { - $path = rtrim($path, '/'); - $path .= '/admin'; + $ses_mode = $this->Application->ConfigValue('CookieSessions'); + if ($ses_mode == 2) $mode = smAUTO; + if ($ses_mode == 1) $mode = smCOOKIES_ONLY; + if ($ses_mode == 0) $mode = smGET_ONLY; } - $this->SetCookiePath( $path ); - $ses_mode = $this->Application->ConfigValue('CookieSessions'); - if ($ses_mode == 2) $mode = smAUTO; - if ($ses_mode == 1) $mode = smCOOKIES_ONLY; - if ($ses_mode == 0) $mode = smGET_ONLY; - if ( defined('ADMIN') && ADMIN ) $mode = smAUTO; $this->SetMode($mode); - $this->SetCookieName( $this->Application->ConfigValue('SessionCookieName') ); - $this->SetCookieDomain(SERVER_NAME); + parent::Init($prefix,$special); if( !$this->Application->IsAdmin() && $this->GetField('PortalUserId') <= 0 )