00001 <?php
00002
00003 DEFINE('_DB_SESSION_HANDLER', getShopBasePath() . 'core/adodblite/session/adodb-session.php');
00004
00005 if (oxConfig::getInstance()->getConfigParam( 'blAdodbSessionHandler' ) ) {
00006 $oDB = oxDb::getDb();
00007 include_once _DB_SESSION_HANDLER;
00008 }
00009
00015 class oxSession extends oxSuperCfg
00016 {
00022 protected $_sName = 'sid';
00023
00029 protected $_sForcedPrefix = 'force_';
00030
00035 protected $_sId = null;
00036
00042 protected static $_blIsNewSession = false;
00043
00047 protected static $_instance = null;
00048
00053 protected static $_oUser = null;
00054
00061 protected $_blNewSession = false;
00062
00068 protected $_blForceNewSession = false;
00069
00075 protected $_sErrorMsg = null;
00076
00082 protected $_oBasket = null;
00083
00089 protected $_oBasketReservations = null;
00090
00096 protected $_blStarted = false;
00097
00106 protected $_aRequireSessionWithParams = array(
00107 'cl' => array (
00108 'register' => true,
00109 'account' => true,
00110 ),
00111 'fnc' => array (
00112 'tobasket' => true,
00113 'login_noredirect' => true,
00114 'tocomparelist' => true,
00115 ),
00116 '_artperpage' => true,
00117 'ldtype' => true,
00118 'listorderby' => true,
00119 );
00120
00126 protected $_blSidNeeded = null;
00127
00133 protected $_aPersistentParams = array("actshop", "lang", "currency", "language", "tpllanguage");
00134
00140 public static function getInstance()
00141 {
00142 if ( defined('OXID_PHP_UNIT')) {
00143 if ( isset( modSession::$unitMOD) && is_object( modSession::$unitMOD)) {
00144 return modSession::$unitMOD;
00145 }
00146 }
00147 if (!isset(self::$_instance)) {
00148 self::$_instance = oxNew( 'oxsession' );
00149 }
00150 return self::$_instance;
00151 }
00152
00158 public function getId()
00159 {
00160 return $this->_sId;
00161 }
00162
00170 public function setId($sVal)
00171 {
00172 $this->_sId = $sVal;
00173 }
00174
00182 public function setName($sVal)
00183 {
00184 $this->_sName = $sVal;
00185 }
00186
00192 public function getForcedName()
00193 {
00194 return $this->_sForcedPrefix . $this->getName();
00195 }
00196
00202 public function getName()
00203 {
00204 return $this->_sName;
00205 }
00206
00212 public function start()
00213 {
00214 $myConfig = $this->getConfig();
00215 $sid = null;
00216
00217 if ( $this->isAdmin() ) {
00218 $this->setName("admin_sid");
00219 } else {
00220 $this->setName("sid");
00221 }
00222
00223 $sForceSidParam = oxConfig::getParameter($this->getForcedName());
00224 $sSidParam = oxConfig::getParameter($this->getName());
00225
00226
00227 if ($sForceSidParam) {
00228 $sid = $sForceSidParam;
00229 } elseif ($this->_getSessionUseCookies() && $this->_getCookieSid()) {
00230 $sid = $this->_getCookieSid();
00231 } elseif ($sSidParam) {
00232 $sid = $sSidParam;
00233 }
00234
00235
00236 if ( $this->_allowSessionStart() ) {
00237
00238
00239 if ( !$sid ) {
00240 self::$_blIsNewSession = true;
00241 $this->initNewSession();
00242 } else {
00243 self::$_blIsNewSession = false;
00244 $this->_setSessionId( $sid );
00245 $this->_sessionStart();
00246 }
00247
00248
00249 if ( $this->_sId != session_id() ) {
00250 $this->_setSessionId( session_id() );
00251 }
00252
00253
00254 $blSwapped = $this->_isSwappedClient();
00255 if ( !self::$_blIsNewSession && $blSwapped ) {
00256 $this->initNewSession();
00257
00258
00259 if ( $this->_sErrorMsg && $myConfig->getConfigParam( 'iDebug' ) ) {
00260 oxUtilsView::getInstance()->addErrorToDisplay( oxNew( "oxException", $this->_sErrorMsg ) );
00261 }
00262 } elseif ( !$blSwapped ) {
00263
00264 oxUtilsServer::getInstance()->loadSessionCookies();
00265 }
00266 }
00267 }
00268
00274 public function getRequestChallengeToken()
00275 {
00276 return preg_replace('/[^a-z0-9]/i', '', oxConfig::getParameter('stoken'));
00277 }
00278
00284 public function getSessionChallengeToken()
00285 {
00286 $sRet = preg_replace('/[^a-z0-9]/i', '', self::getVar('sess_stoken'));
00287 if (!$sRet) {
00288 $this->_initNewSessionChallenge();
00289 $sRet = self::getVar('sess_stoken');
00290 }
00291 return $sRet;
00292 }
00293
00300 public function checkSessionChallenge()
00301 {
00302 $sToken = $this->getSessionChallengeToken();
00303 return $sToken && ($sToken == $this->getRequestChallengeToken());
00304 }
00305
00311 protected function _initNewSessionChallenge()
00312 {
00313 self::setVar('sess_stoken', sprintf('%X', crc32(oxUtilsObject::getInstance()->generateUID())));
00314 }
00315
00321 protected function _sessionStart()
00322 {
00323
00324 session_cache_limiter( 'nocache' );
00325
00326
00327
00328 if ( isset( $_SERVER['HTTP_USER_AGENT'] ) &&
00329 strpos( $_SERVER['HTTP_USER_AGENT'], 'AOL' ) !== false ) {
00330
00331 session_cache_limiter(false);
00332 header("Cache-Control: no-store, private, must-revalidate, proxy-revalidate, post-check=0, pre-check=0, max-age=0, s-maxage=0");
00333 }
00334
00335 $this->_blStarted = @session_start();
00336 if ( !$this->getSessionChallengeToken() ) {
00337 $this->_initNewSessionChallenge();
00338 }
00339
00340 return $this->_blStarted;
00341 }
00342
00348 public function initNewSession()
00349 {
00350
00351 if ( self::$_blIsNewSession ) {
00352 $this->_sessionStart();
00353 }
00354
00355
00356 $aPersistent = array();
00357 foreach ( $this->_aPersistentParams as $sParam ) {
00358 if ( ( $sValue = self::getVar( $sParam ) ) ) {
00359 $aPersistent[$sParam] = $sValue;
00360 }
00361 }
00362
00363 $this->_setSessionId( $this->_getNewSessionId() );
00364
00365
00366 foreach ( $aPersistent as $sKey => $sParam ) {
00367 self::setVar( $sKey, $aPersistent[$sKey] );
00368 }
00369
00370 $this->_initNewSessionChallenge();
00371
00372
00373 self::setVar( "sessionagent", oxUtilsServer::getInstance()->getServerVar( 'HTTP_USER_AGENT' ) );
00374 }
00375
00381 public function regenerateSessionId()
00382 {
00383
00384 if ( self::$_blIsNewSession ) {
00385 $this->_sessionStart();
00386
00387
00388 self::setVar( "sessionagent", oxUtilsServer::getInstance()->getServerVar( 'HTTP_USER_AGENT' ) );
00389 }
00390
00391 $this->_setSessionId( $this->_getNewSessionId( false ) );
00392 $this->_initNewSessionChallenge();
00393 }
00394
00403 protected function _getNewSessionId( $blUnset = true )
00404 {
00405 $sOldId = session_id();
00406 session_regenerate_id( ! oxConfig::getInstance()->getConfigParam( 'blAdodbSessionHandler' ) );
00407 $sNewId = session_id();
00408
00409 if ( $blUnset ) {
00410 session_unset();
00411 }
00412
00413 if ( oxConfig::getInstance()->getConfigParam( 'blAdodbSessionHandler' ) ) {
00414 $oDB = oxDb::getDb();
00415 $oDB->execute("UPDATE oxsessions SET SessionID = ".$oDB->quote( $sNewId )." WHERE SessionID = ".$oDB->quote( $sOldId ) );
00416 }
00417
00418 return session_id();
00419 }
00420
00426 public function freeze()
00427 {
00428
00429 self::setVar( $this->_getBasketName(), serialize( $this->getBasket() ) );
00430
00431 session_write_close();
00432 }
00433
00439 public function destroy()
00440 {
00441
00442 unset($_SESSION);
00443 session_destroy();
00444 }
00445
00453 public static function hasVar( $name )
00454 {
00455 if ( defined( 'OXID_PHP_UNIT' ) ) {
00456 if ( isset( modSession::$unitMOD ) && is_object( modSession::$unitMOD ) ) {
00457 try{
00458 $sVal = modSession::getInstance()->getVar( $name );
00459 return isset( $sVal );
00460 } catch( Exception $e ) {
00461
00462 }
00463 }
00464 }
00465
00466 return isset($_SESSION[$name]);
00467 }
00468
00477 public static function setVar( $name, $value)
00478 {
00479 if ( defined( 'OXID_PHP_UNIT' ) ) {
00480 if ( isset( modSession::$unitMOD ) && is_object( modSession::$unitMOD ) ) {
00481 try{
00482 return modSession::getInstance()->setVar( $name, $value );
00483 } catch( Exception $e ) {
00484
00485 }
00486 }
00487 }
00488
00489 $_SESSION[$name] = $value;
00490
00491 }
00492
00500 public static function getVar( $name )
00501 {
00502 if ( defined( 'OXID_PHP_UNIT' ) ) {
00503 if ( isset( modSession::$unitMOD ) && is_object( modSession::$unitMOD ) ) {
00504 try{
00505 return modSession::getInstance()->getVar( $name );
00506 } catch( Exception $e ) {
00507
00508 }
00509 }
00510 }
00511
00512 if ( isset( $_SESSION[$name] )) {
00513 return $_SESSION[$name];
00514 } else {
00515 return null;
00516 }
00517 }
00518
00526 public static function deleteVar( $name )
00527 {
00528 if ( defined( 'OXID_PHP_UNIT' ) ) {
00529 if ( isset( modSession::$unitMOD ) && is_object( modSession::$unitMOD ) ) {
00530 try{
00531 return modSession::getInstance()->setVar( $name, null );
00532 } catch( Exception $e ) {
00533
00534 }
00535 }
00536 }
00537
00538 $_SESSION[$name] = null;
00539
00540 unset($_SESSION[$name]);
00541 }
00542
00552 public function sid( $blForceSid = false )
00553 {
00554 $myConfig = $this->getConfig();
00555 $blUseCookies = $this->_getSessionUseCookies();
00556 $sRet = '';
00557
00558 $blDisableSid = oxUtils::getInstance()->isSearchEngine()
00559 && is_array($myConfig->getConfigParam( 'aCacheViews' ) )
00560 && !$this->isAdmin();
00561
00562
00563 if ( !$blDisableSid && $this->getId() && ($blForceSid || !$blUseCookies || !$this->_getCookieSid())) {
00564 $sRet = ( $blForceSid ? $this->getForcedName() : $this->getName() )."=".$this->getId();
00565 }
00566
00567 if ($this->isAdmin()) {
00568
00569 if ($sRet) {
00570 $sRet .= '&';
00571 }
00572 $sRet .= 'stoken='.$this->getSessionChallengeToken();
00573 }
00574
00575 return $sRet;
00576 }
00577
00583 public function hiddenSid()
00584 {
00585 $sToken = "<input type=\"hidden\" name=\"stoken\" value=\"".$this->getSessionChallengeToken(). "\">";
00586 $sSid = "<input type=\"hidden\" name=\"".$this->getForcedName()."\" value=\"". $this->getId() . "\">";
00587 return $sToken.$sSid;
00588 }
00589
00595 public function getBasket()
00596 {
00597 if ( $this->_oBasket === null ) {
00598 $sBasket = self::getVar( $this->_getBasketName() );
00599
00600
00601
00602 oxNew('oxbasketitem');
00603
00604 $oBasket = ( $sBasket && ( $oBasket = unserialize( $sBasket ) ) ) ? $oBasket : null;
00605
00606
00607 if ( !$oBasket || !($oBasket instanceof oxbasket)) {
00608 $oBasket = oxNew('oxbasket');
00609 }
00610
00611 $this->_validateBasket($oBasket);
00612 $this->setBasket( $oBasket );
00613 }
00614
00615 return $this->_oBasket;
00616 }
00617
00625 protected function _validateBasket(oxBasket $oBasket)
00626 {
00627 $aCurrContent = $oBasket->getContents();
00628 if (empty($aCurrContent)) {
00629 return;
00630 }
00631
00632 $iCurrLang = oxLang::getInstance()->getBaseLanguage();
00633 foreach ($aCurrContent as $oContent) {
00634 if ($oContent->getLanguageId() != $iCurrLang) {
00635 $oContent->setLanguageId($iCurrLang);
00636 }
00637 }
00638 }
00639
00647 public function setBasket( $oBasket )
00648 {
00649
00650 $this->_oBasket = $oBasket;
00651 }
00652
00658 public function delBasket()
00659 {
00660 $this->setBasket( null );
00661 self::deleteVar( $this->_getBasketName());
00662 }
00663
00669 public function isNewSession()
00670 {
00671 return self::$_blIsNewSession;
00672 }
00673
00680 public function setForceNewSession()
00681 {
00682 $this->_blForceNewSession = true;
00683 }
00684
00692 public function isSidNeeded( $sUrl = null )
00693 {
00694 if ( $this->_getSessionUseCookies() && $this->_getCookieSid() ) {
00695
00696 if ( ( strpos( $sUrl, "https:" ) === 0 && !$this->getConfig()->isSsl() ) ||
00697 ( strpos( $sUrl, "http:" ) === 0 && $this->getConfig()->isSsl() ) ) {
00698 return true;
00699 }
00700 }
00701
00702 if ( $sUrl && !$this->getConfig()->isCurrentUrl( $sUrl ) ) {
00703 return true;
00704 } elseif ( $this->_blSidNeeded === null ) {
00705
00706 $this->_blSidNeeded = false;
00707
00708
00709 if ( !oxUtils::getInstance()->isSearchEngine() ) {
00710
00711 if ( oxUtilsServer::getInstance()->getOxCookie( $this->getName() ) ) {
00712 $this->_blSidNeeded = false;
00713 } elseif ( $this->_forceSessionStart() ) {
00714 $this->_blSidNeeded = true;
00715 } else {
00716
00717 if ( $blSidNeeded = self::getVar( 'blSidNeeded' ) ) {
00718 $this->_blSidNeeded = true;
00719 } elseif ( $this->_isSessionRequiredAction() ) {
00720 $this->_blSidNeeded = true;
00721
00722
00723 self::setVar( 'blSidNeeded', $this->_blSidNeeded );
00724 }
00725 }
00726 }
00727 }
00728
00729 return $this->_blSidNeeded;
00730 }
00731
00743 public function processUrl( $sUrl )
00744 {
00745 $sSid = $this->sid( $this->isSidNeeded( $sUrl ) );
00746 if ($sSid) {
00747 $oStr = getStr();
00748 $aUrlParts = explode( '#', $sUrl );
00749 if ( !$oStr->preg_match('/(\?|&(amp;)?)sid=/i', $aUrlParts[0]) && (false === $oStr->strpos($aUrlParts[0], $sSid))) {
00750 if (!$oStr->preg_match('/(\?|&(amp;)?)$/', $sUrl)) {
00751 $aUrlParts[0] .= ( $oStr->strstr( $aUrlParts[0], '?' ) !== false ? '&' : '?' );
00752 }
00753 $aUrlParts[0] .= $sSid . '&';
00754 }
00755 $sUrl = join( '#', $aUrlParts );
00756 }
00757 return $sUrl;
00758 }
00759
00769 public function getRemoteAccessToken($blGenerateNew = true)
00770 {
00771 $sToken = $this->getVar('_rtoken');
00772 if (!$sToken && $blGenerateNew) {
00773 $sToken = md5(rand() . $this->getId());
00774 $sToken = substr($sToken, 0, 8);
00775 self::setVar('_rtoken', $sToken);
00776 }
00777
00778 return $sToken;
00779 }
00780
00787 protected function _forceSessionStart()
00788 {
00789 return ( !oxUtils::getInstance()->isSearchEngine() ) && ( (( bool ) $this->getConfig()->getConfigParam( 'blForceSessionStart' )) || oxConfig::getParameter( "su" ) || $this->_blForceNewSession );
00790 }
00791
00797 protected function _allowSessionStart()
00798 {
00799 $blAllowSessionStart = true;
00800 $myConfig = oxConfig::getInstance();
00801
00802
00803 if ( !$this->isAdmin() ) {
00804 if ( oxUtils::getInstance()->isSearchEngine() || oxConfig::getParameter( 'skipSession' ) ) {
00805 $blAllowSessionStart = false;
00806 } elseif (oxUtilsServer::getInstance()->getOxCookie( 'oxid_'.$myConfig->getShopId().'_autologin' ) === '1') {
00807 $blAllowSessionStart = true;
00808 } elseif ( !$this->_forceSessionStart() && !oxUtilsServer::getInstance()->getOxCookie( 'sid_key' ) ) {
00809
00810
00811
00812
00813 if ( !oxUtilsServer::getInstance()->getOxCookie( $this->getName() ) &&
00814 !( oxConfig::getParameter( $this->getName() ) || oxConfig::getParameter( $this->getForcedName() ) ) &&
00815 !$this->_isSessionRequiredAction() ) {
00816 $blAllowSessionStart = false;
00817 }
00818 }
00819 }
00820
00821 return $blAllowSessionStart;
00822 }
00823
00831 protected function _isSwappedClient()
00832 {
00833 $blSwapped = false;
00834 $myUtilsServer = oxUtilsServer::getInstance();
00835
00836
00837 if ( !oxUtils::getInstance()->isSearchEngine() && !$myUtilsServer->isTrustedClientIp() && !$this->_isValidRemoteAccessToken()) {
00838
00839 $myConfig = $this->getConfig();
00840
00841
00842 $blSwapped = $this->_checkUserAgent( $myUtilsServer->getServerVar( 'HTTP_USER_AGENT' ), self::getVar( 'sessionagent' ) );
00843 if ( !$blSwapped ) {
00844 if ( $myConfig->getConfigParam( 'blAdodbSessionHandler' ) ) {
00845 $blSwapped = $this->_checkSid();
00846 }
00847
00848 if ( !$blSwapped ) {
00849 $blDisableCookieCheck = $myConfig->getConfigParam( 'blDisableCookieCheck' );
00850 $blUseCookies = $this->_getSessionUseCookies();
00851 if ( !$blDisableCookieCheck && $blUseCookies ) {
00852 $blSwapped = $this->_checkCookies( $myUtilsServer->getOxCookie( 'sid_key' ), self::getVar( "sessioncookieisset" ) );
00853 }
00854 }
00855 }
00856 }
00857
00858 return $blSwapped;
00859 }
00860
00869 protected function _checkUserAgent( $sAgent, $sExistingAgent )
00870 {
00871 $blCheck = false;
00872
00873
00874 $oUtils = oxUtilsServer::getInstance();
00875 $sAgent = $oUtils->processUserAgentInfo( $sAgent );
00876 $sExistingAgent = $oUtils->processUserAgentInfo( $sExistingAgent );
00877
00878 if ( $sAgent && $sAgent !== $sExistingAgent ) {
00879 if ( $sExistingAgent ) {
00880 $this->_sErrorMsg = "Different browser ({$sExistingAgent}, {$sAgent}), creating new SID...<br>";
00881 }
00882 $blCheck = true;
00883 }
00884
00885 return $blCheck;
00886 }
00887
00893 protected function _checkSid()
00894 {
00895 $oDb = oxDb::getDb();
00896
00897 $sSID = $oDb->getOne("select SessionID from oxsessions where SessionID = ".$oDb->quote( $this->getId() ));
00898
00899
00900
00901 if ( !$this->_blNewSession && (!isset( $sSID) || !$sSID)) {
00902
00903 $this->_sErrorMsg = "Session has expired in the past and someone uses this sid to reactivate it, creating new SID...<br>";
00904 return true;
00905 }
00906 return false;
00907 }
00908
00918 protected function _checkCookies( $sCookieSid, $aSessCookieSetOnce )
00919 {
00920 $blSwapped = false;
00921 $myConfig = $this->getConfig();
00922 $sCurrUrl = $myConfig->isSsl() ? $myConfig->getSslShopUrl() : $myConfig->getShopUrl();
00923
00924 $blSessCookieSetOnce = false;
00925 if ( is_array($aSessCookieSetOnce) && isset( $aSessCookieSetOnce[$sCurrUrl] ) ) {
00926 $blSessCookieSetOnce = $aSessCookieSetOnce[$sCurrUrl];
00927 }
00928
00929
00930 if ( $blSessCookieSetOnce && !$sCookieSid ) {
00931 if ( $myConfig->getConfigParam( 'iDebug' ) ) {
00932 $this->_sErrorMsg = "Cookie not found, creating new SID...<br>";
00933 $this->_sErrorMsg .= "Cookie: $sCookieSid<br>";
00934 $this->_sErrorMsg .= "Session: $blSessCookieSetOnce<br>";
00935 $this->_sErrorMsg .= "URL: ".$sCurrUrl."<br>";
00936 }
00937 $blSwapped = true;
00938 }
00939
00940
00941 if ( $sCookieSid == "oxid" && !$blSessCookieSetOnce ) {
00942 if (!is_array($aSessCookieSetOnce)) {
00943 $aSessCookieSetOnce = array();
00944 }
00945
00946 $aSessCookieSetOnce[$sCurrUrl] = "ox_true";
00947 self::setVar( "sessioncookieisset", $aSessCookieSetOnce );
00948 }
00949
00950
00951 if ( !$sCookieSid ) {
00952 oxUtilsServer::getInstance()->setOxCookie( 'sid_key', 'oxid' );
00953 }
00954 return $blSwapped;
00955 }
00956
00964 protected function _setSessionId($sSessId)
00965 {
00966
00967 if ( $sSessId && session_id() != $sSessId ) {
00968 $this->_blNewSession = true;
00969 }
00970
00971 session_id( $sSessId );
00972
00973 $this->setId( $sSessId );
00974
00975 $blUseCookies = $this->_getSessionUseCookies();
00976
00977 if ( !$this->_allowSessionStart() ) {
00978 if ( $blUseCookies ) {
00979 oxUtilsServer::getInstance()->setOxCookie( $this->getName(), null );
00980 }
00981 return;
00982 }
00983
00984 if ( $blUseCookies ) {
00985
00986 oxUtilsServer::getInstance()->setOxCookie( $this->getName(), $sSessId );
00987 }
00988 }
00989
00995 protected function _getBasketName()
00996 {
00997 $myConfig = $this->getConfig();
00998 if ( $myConfig->getConfigParam( 'blMallSharedBasket' ) == 0 ) {
00999 return $myConfig->getShopId()."_basket";
01000 }
01001 return "basket";
01002 }
01003
01009 protected function _getCookieSid()
01010 {
01011 return oxUtilsServer::getInstance()->getOxCookie($this->getName());
01012 }
01013
01020 protected function _getRequireSessionWithParams()
01021 {
01022 $aCfgArray = $this->getConfig()->getConfigParam('aRequireSessionWithParams');
01023 if (is_array($aCfgArray)) {
01024 $aDefault = $this->_aRequireSessionWithParams;
01025 foreach ($aCfgArray as $key => $val) {
01026 if (!is_array($val) && $val) {
01027 unset($aDefault[$key]);
01028 }
01029 }
01030 return array_merge_recursive($aCfgArray, $aDefault);
01031 }
01032 return $this->_aRequireSessionWithParams;
01033 }
01034
01040 protected function _isSessionRequiredAction()
01041 {
01042 foreach ($this->_getRequireSessionWithParams() as $sParam => $aValues) {
01043 $sValue = oxConfig::getParameter( $sParam );
01044 if (isset($sValue)) {
01045 if (is_array($aValues)) {
01046 if (isset($aValues[$sValue]) && $aValues[$sValue]) {
01047 return true;
01048 }
01049 } elseif ($aValues) {
01050 return true;
01051 }
01052 }
01053 }
01054
01055 return ( isset( $_SERVER['REQUEST_METHOD'] ) && $_SERVER['REQUEST_METHOD'] == 'POST');
01056 }
01057
01063 protected function _getSessionUseCookies()
01064 {
01065 return $this->isAdmin() || $this->getConfig()->getConfigParam( 'blSessionUseCookies');
01066 }
01067
01073 protected function _isValidRemoteAccessToken()
01074 {
01075 $sInputToken = oxConfig::getParameter('rtoken');
01076 $sToken = $this->getRemoteAccessToken(false);
01077 $blTokenEqual = !(bool)strcmp($sInputToken, $sToken);
01078 $blValid = $sInputToken && $blTokenEqual;
01079
01080 return $blValid;
01081 }
01082
01088 public function getBasketReservations()
01089 {
01090 if (!$this->_oBasketReservations) {
01091 $this->_oBasketReservations = oxNew('oxBasketReservation');
01092 }
01093 return $this->_oBasketReservations;
01094 }
01095
01101 public function isHeaderSent()
01102 {
01103 return headers_sent();
01104 }
01105
01111 public function isSessionStarted()
01112 {
01113 return $this->_blStarted;
01114 }
01115 }