Version 3.1.4
This commit is contained in:
1 parent
1d4720f3e2
commit
ae5c01cc78
2563 files changed
+283048
-240689
No files matched your search
@@ -1,19 +1,21 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* IP.Board v3.1.4
|
||||
* Skin Functions
|
||||
* Last Updated: $Date: 2009-10-01 10:02:08 -0400 (Thu, 01 Oct 2009) $
|
||||
* Last Updated: $Date: 2010-09-13 05:53:37 -0400 (Mon, 13 Sep 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* Owner: Matt
|
||||
* @author $Author: bfarber $
|
||||
* @author $Author: terabyte $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 9th March 2005 11:03
|
||||
* @version $Revision: 5190 $
|
||||
* @version $Revision: 6854 $
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -164,21 +166,28 @@ class userAgentFunctions
|
||||
//-----------------------------------------
|
||||
// Get file...
|
||||
//-----------------------------------------
|
||||
|
||||
$BROWSERS = array();
|
||||
$ENGINES = array();
|
||||
require_once( IPS_ROOT_PATH . 'extensions/userAgents.php' );
|
||||
|
||||
//-----------------------------------------
|
||||
// Build names
|
||||
//-----------------------------------------
|
||||
|
||||
foreach( $BROWSERS as $key => $data )
|
||||
if ( is_array($BROWSERS) && count($BROWSERS) )
|
||||
{
|
||||
$names[] = "'" . $key . "'";
|
||||
foreach( $BROWSERS as $key => $data )
|
||||
{
|
||||
$names[] = "'" . $key . "'";
|
||||
}
|
||||
}
|
||||
|
||||
foreach( $ENGINES as $key => $data )
|
||||
if ( is_array($ENGINES) && count($ENGINES) )
|
||||
{
|
||||
$names[] = "'" . $key . "'";
|
||||
foreach( $ENGINES as $key => $data )
|
||||
{
|
||||
$names[] = "'" . $key . "'";
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
@@ -516,8 +525,8 @@ class userAgentFunctions
|
||||
|
||||
$uagent_id = intval( $uagent_id );
|
||||
$uagent_key = strtolower( IPSText::alphanumericalClean( $uagent_key ) );
|
||||
$uagent_name = $uagent_name;
|
||||
$uagent_regex = $uagent_regex;
|
||||
$uagent_name = trim( $uagent_name );
|
||||
$uagent_regex = trim( $uagent_regex );
|
||||
$uagent_regex_capture = intval( $uagent_regex_capture );
|
||||
$uagent_type = IPSText::alphanumericalClean( $uagent_type );
|
||||
$uagent_position = intval( $uagent_position );
|
||||
@@ -613,8 +622,8 @@ class userAgentFunctions
|
||||
//-----------------------------------------
|
||||
|
||||
$uagent_key = strtolower( IPSText::alphanumericalClean( $uagent_key ) );
|
||||
$uagent_name = $uagent_name;
|
||||
$uagent_regex = $uagent_regex;
|
||||
$uagent_name = trim($uagent_name);
|
||||
$uagent_regex = trim($uagent_regex);
|
||||
$uagent_regex_capture = intval( $uagent_regex_capture );
|
||||
$uagent_type = IPSText::alphanumericalClean( $uagent_type );
|
||||
$uagent_position = intval( $uagent_position );
|
||||
@@ -744,13 +753,13 @@ class userAgentFunctions
|
||||
//-----------------------------------------
|
||||
// Test in the DB
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$userAgentCache = $this->cache->getCache('useragents');
|
||||
|
||||
foreach( $userAgentCache as $key => $data )
|
||||
{
|
||||
$regex = str_replace( '#', '\\#', $data['uagent_regex'] );
|
||||
|
||||
|
||||
if ( ! preg_match( "#{$regex}#i", $userAgent, $matches ) )
|
||||
{
|
||||
continue;
|
||||
|
||||
Reference in new issue
Block a user