Version 5.0.0 beta 4
This commit is contained in:
1 parent
e86153356a
commit
2f24f9de48
276 files changed
+8614
-6044
No files matched your search
@@ -305,7 +305,7 @@ class Front extends Session
|
||||
}
|
||||
else
|
||||
{
|
||||
$type = $this->userAgent->spider ? static::LOGIN_TYPE_SPIDER : static::LOGIN_TYPE_GUEST;
|
||||
$type = $this->userAgent->bot ? static::LOGIN_TYPE_SPIDER : static::LOGIN_TYPE_GUEST;
|
||||
}
|
||||
|
||||
/* Set data */
|
||||
@@ -327,7 +327,7 @@ class Front extends Session
|
||||
'current_id' => ( Request::i()->isAjax() ) ? ( $session ? $session['current_id'] : NULL ) : intval( Request::i()->id ),
|
||||
'uagent_key' => $this->userAgent->browser ?: '',
|
||||
'uagent_version' => $this->userAgent->browserVersion ?: '',
|
||||
'uagent_type' => $this->userAgent->spider ? 'search' : 'browser',
|
||||
'uagent_type' => $this->userAgent->bot ? 'search' : 'browser',
|
||||
'search_thread_id' => $session ? intval( $session['search_thread_id'] ) : 0,
|
||||
'search_thread_time' => $session ? $session['search_thread_time'] : 0,
|
||||
'data' => $session ? $session['data'] : '',
|
||||
@@ -341,10 +341,10 @@ class Front extends Session
|
||||
);
|
||||
|
||||
/* Is this a spider? */
|
||||
if( $this->userAgent->spider )
|
||||
if( $this->userAgent->bot )
|
||||
{
|
||||
/* Is this Facebook? Do we need to treat them as a user of a different group? */
|
||||
if( $this->userAgent->spider == 'facebook' )
|
||||
if( $this->userAgent->bot == 'facebook' )
|
||||
{
|
||||
if( Service::load( 'facebook', 'share_key' )->enabled )
|
||||
{
|
||||
@@ -425,7 +425,7 @@ class Front extends Session
|
||||
$this->data['data'] = $data;
|
||||
$this->setLocationData();
|
||||
|
||||
if ( $this->save === TRUE and ( !empty( Request::i()->cookie ) or $this->userAgent->spider or $this->member->member_id ) ) // If a guest and cookies are disabled we do not write to database to prevent duplicate sessions unless it's a search engine, which we deal with separately
|
||||
if ( $this->save === TRUE and ( !empty( Request::i()->cookie ) or $this->userAgent->bot or $this->member->member_id ) ) // If a guest and cookies are disabled we do not write to database to prevent duplicate sessions unless it's a search engine, which we deal with separately
|
||||
{
|
||||
if( method_exists( '\IPS\Session\Store', 'updateSession' ) )
|
||||
{
|
||||
|
||||
@@ -64,7 +64,7 @@ class Database extends Store
|
||||
$userAgent = Useragent::parse();
|
||||
|
||||
/* Spiders match by IP and useragent */
|
||||
if ( $userAgent->spider )
|
||||
if ( $userAgent->bot )
|
||||
{
|
||||
$session = Db::i()->select( '*', 'core_sessions', array( 'id=? OR ( ip_address=? AND browser=? )', $sessionId, Request::i()->ipAddress(), $_SERVER['HTTP_USER_AGENT'] ) )->first();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user