Version 4.3.0
This commit is contained in:
1 parent
96997ddd8e
commit
fe1acf984a
1349 files changed
+116159
-67711
No files matched your search
@@ -48,11 +48,12 @@ abstract class _Session
|
||||
if( static::$instance === NULL )
|
||||
{
|
||||
$classname = get_called_class();
|
||||
if ( get_called_class() === 'IPS\Session' )
|
||||
|
||||
if ( $classname === 'IPS\Session' )
|
||||
{
|
||||
if( class_exists( 'IPS\Dispatcher', FALSE ) )
|
||||
{
|
||||
$location = ( \IPS\Dispatcher::hasInstance() ) ? ucfirst( \IPS\Dispatcher::i()->controllerLocation ) : 'Front';
|
||||
$location = ( \IPS\Dispatcher::hasInstance() ) ? mb_ucfirst( \IPS\Dispatcher::i()->controllerLocation ) : 'Front';
|
||||
$classname = 'IPS\Session\\' . $location;
|
||||
}
|
||||
else
|
||||
@@ -69,7 +70,7 @@ abstract class _Session
|
||||
{
|
||||
/* Create class */
|
||||
static::$instance = new $classname;
|
||||
|
||||
|
||||
/* Name the session */
|
||||
$name = session_name( ( \IPS\COOKIE_PREFIX !== NULL ) ? \IPS\COOKIE_PREFIX . 'IPSSession' . $location : 'IPSSession' . $location );
|
||||
|
||||
@@ -185,10 +186,10 @@ abstract class _Session
|
||||
/* Set the last activity */
|
||||
if ( isset( $this->data ) and $this->data['login_type'] != static::LOGIN_TYPE_ANONYMOUS and ! \IPS\Request::i()->isAjax() )
|
||||
{
|
||||
if ( time() - $this->member->last_activity > 3600 )
|
||||
if ( time() - $this->member->last_visit > 3600 )
|
||||
{
|
||||
$save = TRUE;
|
||||
$this->member->last_visit = $this->member->last_activity;
|
||||
$this->member->last_visit = time();
|
||||
}
|
||||
if ( time() - $this->member->last_activity > 180 )
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user