Changeset 9971

Show
Ignore:
Timestamp:
11/18/08 17:54:05 (2 months ago)
Author:
afz
Message:

change code location of prevent load/delete session for robots

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/0.8/jaws/html/include/Jaws/Session.php

    r9832 r9971  
    119119        include_once JAWS_PATH . 'include/Jaws/Session/Cache.php'; 
    120120        $this->_cache = new Jaws_Session_Cache; 
    121         // Delete expired sessions 
    122         // FIXME: Maybe we can store a value in JAWS_DATA/last_expired 
    123         // (or something) and use it to run this code only if 
    124         // last_expired > time to delete expired sessions 
    125         $this->_cache->DeleteExpiredSessions(); 
    126121    } 
    127122 
     
    238233    function Load($session_id) 
    239234    { 
     235        if ($GLOBALS['app']->IsAgentRobot()) { 
     236            return false; 
     237        } 
     238 
    240239        if (isset($GLOBALS['log'])) { 
    241240            $GLOBALS['log']->Log(JAWS_LOG_DEBUG, 'Loading session'); 
     
    243242 
    244243        $result = false; 
     244 
     245        // Delete expired sessions 
     246        // FIXME: Maybe we can store a value in JAWS_DATA/last_expired 
     247        // (or something) and use it to run this code only if 
     248        // last_expired > time to delete expired sessions 
     249        $this->_cache->DeleteExpiredSessions(); 
     250 
    245251        $session = $this->_cache->GetSession($session_id); 
    246252        if (is_array($session)) { 
     
    278284    function Create($username, $remember) 
    279285    { 
    280         if ($GLOBALS['app']->IsAgentRobot()) { 
    281             return false; 
    282         } 
    283  
    284286        $info = array(); 
    285287        if (empty($username)) {