Version 3.4.8
This commit is contained in:
1 parent
b45ea0dffb
commit
c603205a25
1398 files changed
+36675
-31023
No files matched your search
@@ -2,10 +2,10 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.4.6
|
||||
* IP.Board v3.4.8
|
||||
* Static Member Class for IP.Board 3
|
||||
*
|
||||
* Last Updated: $Date: 2013-10-16 19:11:24 -0400 (Wed, 16 Oct 2013) $
|
||||
* Last Updated: $Date: 2015-01-06 14:58:47 -0500 (Tue, 06 Jan 2015) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: rashbrook $
|
||||
@@ -14,7 +14,7 @@
|
||||
* @package IP.Board
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 12th March 2002
|
||||
* @version $Revision: 12381 $
|
||||
* @version $Revision: 12586 $
|
||||
*
|
||||
* @author Matt
|
||||
*/
|
||||
@@ -99,6 +99,14 @@ class IPSMember
|
||||
* @var unknown_type
|
||||
*/
|
||||
static protected $_sigParser = null;
|
||||
|
||||
/**
|
||||
* Remove Member during merge.
|
||||
* @bool
|
||||
* @brief See ticket 874824 - When merging on an IPS Connect linked slave IPB, the login handler attempts to remove the second account on the master. In this instance, we shouldn't do that.
|
||||
*
|
||||
*/
|
||||
static public $_isMerging = false;
|
||||
|
||||
/**
|
||||
* Member data array
|
||||
@@ -262,7 +270,32 @@ class IPSMember
|
||||
*/
|
||||
static public function canReceiveMobileNotifications( $memberData=array() )
|
||||
{
|
||||
/* Mobile notifications are currently deprecated http://community.invisionpower.com/resources/bugs.html/_/ip-board/remove-push-notification-references-r40643 */
|
||||
return false;
|
||||
|
||||
/* INIT */
|
||||
$memberData = ( is_array( $memberData ) && count( $memberData ) ) ? $memberData : ipsRegistry::member()->fetchMemberData();
|
||||
|
||||
/* Check to see if notifications are enabled */
|
||||
if( ! ipsRegistry::$settings['iphone_notifications_enabled'] )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Check to see if the user has permission to get notifications */
|
||||
if( ipsRegistry::$settings['iphone_notifications_groups'] )
|
||||
{
|
||||
if( IPSMember::isInGroup( $memberData, explode( ',', ipsRegistry::$settings['iphone_notifications_groups'] ) ) )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1062,7 +1095,7 @@ class IPSMember
|
||||
case 'id':
|
||||
if ( is_array( $member_key ) )
|
||||
{
|
||||
$multiple_ids = $member_key;
|
||||
$multiple_ids = array_map( 'intval', $member_key );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1073,7 +1106,7 @@ class IPSMember
|
||||
case 'fb_uid':
|
||||
if ( is_array( $member_key ) )
|
||||
{
|
||||
$multiple_ids = $member_key;
|
||||
$multiple_ids = array_map( 'intval', $member_key );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1089,7 +1122,7 @@ class IPSMember
|
||||
case 'twitter_id':
|
||||
if ( is_array( $member_key ) )
|
||||
{
|
||||
$multiple_ids = $member_key;
|
||||
$multiple_ids = array_map( 'intval', $member_key );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1149,7 +1182,7 @@ class IPSMember
|
||||
case 'ipsconnect':
|
||||
if ( is_array( $member_key ) )
|
||||
{
|
||||
$multiple_ids = $member_key;
|
||||
$multiple_ids = array_map( 'intval', $member_key );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -3782,14 +3815,15 @@ class IPSMember
|
||||
*/
|
||||
static public function canGiveRep( $data, $memberData )
|
||||
{
|
||||
$reppedArray = unserialize( $data['rep_like_cache'] );
|
||||
$reppedArray = unserialize( $data['rep_like_cache'] );
|
||||
|
||||
if( is_array( $reppedArray ) )
|
||||
{
|
||||
$repped = $reppedArray['cache_data']['memberIds'];
|
||||
|
||||
if ( is_array( $repped ) )
|
||||
{
|
||||
if( in_array( ipsRegistry::member()->getProperty('member_id'), $repped ) )
|
||||
if( in_array( ipsRegistry::member()->getProperty('member_id'), $repped ) AND ipsRegistry::$settings['reputation_point_types'] != 'like' )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -4035,9 +4069,54 @@ class IPSMember
|
||||
*/
|
||||
static public function querySpamService( $email, $ip='', $type='register', $test=0 )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
/* Get the response */
|
||||
$key = trim( ipsRegistry::$settings['ipb_reg_number'] );
|
||||
|
||||
if( !$key )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
$domain = ipsRegistry::$settings['board_url'];
|
||||
$ip = ( $ip AND ip2long( $ip ) ) ? $ip : ipsRegistry::member()->ip_address;
|
||||
$response = false;
|
||||
$testConn = $test ? '&debug_mode=1' : '';
|
||||
|
||||
/* Get the file managemnet class */
|
||||
$classToLoad = IPSLib::loadLibrary( IPS_KERNEL_PATH . 'classFileManagement.php', 'classFileManagement' );
|
||||
$query = new $classToLoad();
|
||||
$query->timeout = ipsRegistry::$settings['spam_service_timeout'];
|
||||
|
||||
/* Query the service */
|
||||
$response = $query->postFileContents( "https://remoteservices.invisionpower.com/spam/{$type}", array( 'email' => $email, 'ip' => $ip ), $key, $key );
|
||||
|
||||
if( ! $response )
|
||||
{
|
||||
return 'timeout';
|
||||
}
|
||||
|
||||
/* Make sure the response is valid */
|
||||
$responseCode = $query->http_status_code == 200 ? (int) $response : 0;
|
||||
$responseMsg = $query->http_status_code == 200 ? '' : $response;
|
||||
|
||||
if( $test )
|
||||
{
|
||||
return $responseMsg;
|
||||
}
|
||||
|
||||
/* Log Request */
|
||||
if( $type == 'register' )
|
||||
{
|
||||
ipsRegistry::DB()->insert( 'spam_service_log', array( 'log_date' => time(),
|
||||
'log_code' => $responseCode,
|
||||
'log_msg' => $responseMsg,
|
||||
'email_address' => $email,
|
||||
'ip_address' => $ip ) );
|
||||
}
|
||||
|
||||
return $responseCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a member's posts need to be approved
|
||||
* Note that this only takes into the global mod queue status, individual forums, etc. may
|
||||
@@ -4337,6 +4416,15 @@ class IPSMember
|
||||
self::resetLastRegisteredMember();
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Let IPS know
|
||||
//-----------------------------------------
|
||||
|
||||
if( ipsRegistry::$settings['spam_service_send_to_ips'] )
|
||||
{
|
||||
self::querySpamService( $member['email'], $member['ip_address'], 'markspam' );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Log
|
||||
//-----------------------------------------
|
||||
|
||||
Reference in new issue
Block a user