Changeset 195


Ignore:
Timestamp:
Jul 1, 2006 11:59:48 PM (18 years ago)
Author:
scdev
Message:

Q - auth file clearauth added to constructor.

Location:
trunk/lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Auth_SQL.inc.php

    r189 r195  
    101101       
    102102        $this->_ns = $namespace;
     103       
     104        if (!isset($_SESSION['_auth_sql'][$this->_ns])) {
     105            $this->clear();
     106        }
    103107
    104108        // Initialize default parameters.
     
    256260        $this->initDB();
    257261
    258         $db->query("
    259             UPDATE " . $this->_params['db_table'] . " SET
    260             seconds_online = seconds_online + (UNIX_TIMESTAMP() - UNIX_TIMESTAMP(last_access_datetime)),
    261             last_login_datetime = '0000-00-00 00:00:00'
    262             WHERE " . $this->_params['db_primary_key'] . " = '" . $this->get('user_id') . "'
    263         ");
     262        if ($this->isLoggedIn()) {           
     263            $db->query("
     264                UPDATE " . $this->_params['db_table'] . " SET
     265                seconds_online = seconds_online + (UNIX_TIMESTAMP() - UNIX_TIMESTAMP(last_access_datetime)),
     266                last_login_datetime = '0000-00-00 00:00:00'
     267                WHERE " . $this->_params['db_primary_key'] . " = '" . $this->get('user_id') . "'
     268            ");
     269        }
    264270        $_SESSION['_auth_sql'][$this->_ns] = array('authenticated' => false);
    265271    }
  • trunk/lib/Google_API.inc.php

    r136 r195  
    133133    function _performAPICall($apiCall, $parameters)
    134134    {
     135        $app =& App::getInstance();
     136       
    135137        $result = $this->_soapClient->call(
    136138            $apiCall,
     
    141143            return $result;
    142144        } else {
     145            $app->logMsg(sprintf('Soap Pear error: %s', $result->getMessage()), LOG_NOTICE, __FILE__, __LINE__);
    143146            return false;
    144147        }
Note: See TracChangeset for help on using the changeset viewer.