Version 3.2.3
This commit is contained in:
1 parent
ae5c01cc78
commit
78706903a2
2641 files changed
+228363
-201264
No files matched your search
@@ -3,19 +3,19 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* IP.Board v3.2.3
|
||||
* Converge Handler
|
||||
* Last Updated: $Date: 2010-10-05 09:09:23 -0400 (Tue, 05 Oct 2010) $
|
||||
* Last Updated: $Date: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: terabyte $
|
||||
* @author $Author: ips_terabyte $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage IP.Converge
|
||||
* @link http://www.invisionpower.com
|
||||
* @link http://hatynka.in
|
||||
* @since 2.1.0
|
||||
* @version $Revision: 6943 $
|
||||
* @version $Revision: 8644 $
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -32,10 +32,10 @@ class Converge_Server
|
||||
/**
|
||||
* Global registry
|
||||
*
|
||||
* @access private
|
||||
* @access protected
|
||||
* @var object
|
||||
*/
|
||||
private $registry;
|
||||
protected $registry;
|
||||
|
||||
/**
|
||||
* IPS API SERVER Class
|
||||
@@ -50,7 +50,7 @@ class Converge_Server
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
**/
|
||||
*/
|
||||
public function __construct( $registry )
|
||||
{
|
||||
//-----------------------------------------
|
||||
@@ -68,7 +68,7 @@ class Converge_Server
|
||||
// list
|
||||
//-----------------------------------------
|
||||
|
||||
require_once( DOC_IPS_ROOT_PATH . 'converge_local/apis/allowed_methods.php' );
|
||||
require_once( DOC_IPS_ROOT_PATH . 'converge_local/apis/allowed_methods.php' );/*noLibHook*/
|
||||
|
||||
if ( is_array( $_CONVERGE_ALLOWED_METHODS ) and count( $_CONVERGE_ALLOWED_METHODS ) )
|
||||
{
|
||||
@@ -90,7 +90,7 @@ class Converge_Server
|
||||
* @param int $limit_a SQL limit a
|
||||
* @param int $limit_b SQL limit b
|
||||
* @return mixed xml / boolean
|
||||
**/
|
||||
*/
|
||||
public function requestData( $auth_key, $product_id, $email_address, $getdata_key )
|
||||
{
|
||||
//-----------------------------------------
|
||||
@@ -112,7 +112,7 @@ class Converge_Server
|
||||
// Grab local extension file
|
||||
//-----------------------------------------
|
||||
|
||||
require_once( DOC_IPS_ROOT_PATH . 'converge_local/apis/local_extension.php' );
|
||||
require_once( DOC_IPS_ROOT_PATH . 'converge_local/apis/local_extension.php' );/*noLibHook*/
|
||||
$extension = new local_extension( $this->registry );
|
||||
|
||||
if ( is_callable( array( $extension, $getdata_key ) ) )
|
||||
@@ -144,7 +144,7 @@ class Converge_Server
|
||||
* @param string $auth_key Authentication Key
|
||||
* @param string $multiple_email_addresses Comma delimited list of email addresses
|
||||
* @return mixed xml / boolean
|
||||
**/
|
||||
*/
|
||||
public function onMemberDelete( $auth_key, $product_id, $multiple_email_addresses='' )
|
||||
{
|
||||
//-----------------------------------------
|
||||
@@ -218,7 +218,7 @@ class Converge_Server
|
||||
* @param string $email_address Email address
|
||||
* @param string $md5_once_password Plain text password hashed by MD5
|
||||
* @return mixed xml / boolean
|
||||
**/
|
||||
*/
|
||||
public function onPasswordChange( $auth_key, $product_id, $email_address, $md5_once_password )
|
||||
{
|
||||
//-----------------------------------------
|
||||
@@ -262,7 +262,7 @@ class Converge_Server
|
||||
* @param string $old_email_address Existing email address
|
||||
* @param string $new_email_address NEW email address to change
|
||||
* @return mixed xml / boolean
|
||||
**/
|
||||
*/
|
||||
public function onEmailChange( $auth_key, $product_id, $old_email_address, $new_email_address )
|
||||
{
|
||||
//-----------------------------------------
|
||||
@@ -329,7 +329,7 @@ class Converge_Server
|
||||
* @param string $new_username NEW username to change
|
||||
* @param string $auth Email address
|
||||
* @return mixed xml / boolean
|
||||
**/
|
||||
*/
|
||||
public function onUsernameChange( $auth_key, $product_id, $old_username, $new_username, $auth )
|
||||
{
|
||||
//-----------------------------------------
|
||||
@@ -407,7 +407,7 @@ class Converge_Server
|
||||
* @param int $limit_a SQL limit a
|
||||
* @param int $limit_b SQL limit b
|
||||
* @return mixed xml / boolean
|
||||
**/
|
||||
*/
|
||||
public function importMembers( $auth_key, $product_id, $limit_a, $limit_b )
|
||||
{
|
||||
//-----------------------------------------
|
||||
@@ -483,7 +483,7 @@ class Converge_Server
|
||||
* @param string $auth_key Authentication Key
|
||||
* @param int $product_id Product ID
|
||||
* @return mixed xml / boolean
|
||||
**/
|
||||
*/
|
||||
public function getMembersInfo( $auth_key, $product_id )
|
||||
{
|
||||
//-----------------------------------------
|
||||
@@ -530,7 +530,7 @@ class Converge_Server
|
||||
* @param int $product_id Product ID
|
||||
* @param string $email_address Email address of user logged in
|
||||
* @return mixed xml / boolean
|
||||
**/
|
||||
*/
|
||||
public function convergeLogOut( $auth_key, $product_id, $email_address='' )
|
||||
{
|
||||
//-----------------------------------------
|
||||
@@ -633,7 +633,7 @@ class Converge_Server
|
||||
* @param mixed $extra_data Extra member account data
|
||||
* @param string $username Member's user name
|
||||
* @return mixed xml / boolean
|
||||
**/
|
||||
*/
|
||||
public function convergeLogIn( $auth_key, $product_id, $email_address='', $md5_once_password='', $ip_address='', $unix_join_date='', $timezone=0, $dst_autocorrect=0, $extra_data='', $username='' )
|
||||
{
|
||||
//-----------------------------------------
|
||||
@@ -672,21 +672,20 @@ class Converge_Server
|
||||
//-----------------------------------------
|
||||
|
||||
$member = IPSMember::load( $email_address );
|
||||
$this->registry->member()->setMember( $member['member_id'] );
|
||||
|
||||
//-----------------------------------------
|
||||
// No such user? Create one!
|
||||
// FAIL SAFE
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ! $this->memberData['member_id'] )
|
||||
if ( ! $member['member_id'] )
|
||||
{
|
||||
$unix_join_date = $unix_join_date ? $unix_join_date : time();
|
||||
$md5_once_password = $md5_once_password ? $md5_once_password : md5( $email_address . $unix_join_date . uniqid( microtime() ) );
|
||||
$ip_address = $ip_address ? $ip_address : '127.0.0.1';
|
||||
|
||||
$this->registry->member()->setMember( $this->__create_user_account( $email_address, $md5_once_password, $ip_address, $unix_join_date, $timezone, $dst_autocorrect, $username ) );
|
||||
$return = 'SUCCESS';
|
||||
|
||||
$member = $this->__create_user_account( $email_address, $md5_once_password, $ip_address, $unix_join_date, $timezone, $dst_autocorrect, $username );
|
||||
$return = 'SUCCESS';
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -696,8 +695,8 @@ class Converge_Server
|
||||
//-----------------------------------------
|
||||
// Start session
|
||||
//-----------------------------------------
|
||||
|
||||
$session = $this->__create_user_session( $this->memberData );
|
||||
|
||||
$session = $this->__create_user_session( $member );
|
||||
|
||||
//-----------------------------------------
|
||||
// Add cookies
|
||||
@@ -735,11 +734,11 @@ class Converge_Server
|
||||
*
|
||||
* Has to return at least the member ID, member log in key and session ID
|
||||
*
|
||||
* @access private
|
||||
* @access protected
|
||||
* @param object $member Member object (can access as an array of member information thx to SPL)
|
||||
* @return array $session Session information
|
||||
**/
|
||||
private function __create_user_session( $member )
|
||||
*/
|
||||
protected function __create_user_session( $member )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
@@ -751,7 +750,7 @@ class Converge_Server
|
||||
// Generate a new log in key
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $this->settings['login_change_key'] OR ! $member['member_login_key'] )
|
||||
if ( ! $member['member_login_key'] )
|
||||
{
|
||||
$update['member_login_key'] = IPSMember::generateAutoLoginKey();
|
||||
}
|
||||
@@ -777,8 +776,8 @@ class Converge_Server
|
||||
|
||||
$this->registry->member()->setMember( $member['member_id'] );
|
||||
|
||||
require_once( IPS_ROOT_PATH . 'sources/classes/session/publicSessions.php' );
|
||||
require_once( IPS_ROOT_PATH . 'sources/classes/session/convergeSessions.php' );
|
||||
require_once( IPS_ROOT_PATH . 'sources/classes/session/publicSessions.php' );/*noLibHook*/
|
||||
require_once( IPS_ROOT_PATH . 'sources/classes/session/convergeSessions.php' );/*noLibHook*/
|
||||
$session = new convergeSessions( $this->registry );
|
||||
$session->time_now = time();
|
||||
|
||||
@@ -801,8 +800,8 @@ class Converge_Server
|
||||
* @param string $dst_autocorrect The member's DST autocorrect settings
|
||||
* @param string $username The member's username
|
||||
* @return array $member Newly created member array
|
||||
**/
|
||||
private function __create_user_account( $email_address='', $md5_once_password, $ip_address, $unix_join_date, $timezone=0, $dst_autocorrect=0, $username='' )
|
||||
*/
|
||||
protected function __create_user_account( $email_address='', $md5_once_password, $ip_address, $unix_join_date, $timezone=0, $dst_autocorrect=0, $username='' )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Check to make sure there's not already
|
||||
@@ -834,9 +833,9 @@ class Converge_Server
|
||||
'joined' => $unix_join_date,
|
||||
'ip_address' => $ip_address,
|
||||
'members_created_remote' => true
|
||||
) ), false, true );
|
||||
) ), false, true, false );
|
||||
|
||||
return $member['member_id'];
|
||||
return $member;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -844,12 +843,12 @@ class Converge_Server
|
||||
*
|
||||
* Checks to see if the request is allowed
|
||||
*
|
||||
* @access private
|
||||
* @access protected
|
||||
* @param string $key Authenticate Key
|
||||
* @param string $product_id Product ID
|
||||
* @return string Error message, if any
|
||||
**/
|
||||
private function __authenticate( $key, $product_id )
|
||||
*/
|
||||
protected function __authenticate( $key, $product_id )
|
||||
{
|
||||
$this->registry->getClass( 'class_localization' )->loadLanguageFile( array( 'api_langbits' ), 'core' );
|
||||
|
||||
@@ -889,8 +888,8 @@ class Converge_Server
|
||||
* @param string $product_id Product ID
|
||||
* @param string $gateway_key Gateway key
|
||||
* @param mixed $arg Additional arguments
|
||||
* @return void
|
||||
**/
|
||||
* @return @e void
|
||||
*/
|
||||
public function requestAdditionalData( $auth_key, $product_id, $getdata_key, $arg )
|
||||
{
|
||||
//-----------------------------------------
|
||||
@@ -912,7 +911,7 @@ class Converge_Server
|
||||
// Grab local extension file
|
||||
//-----------------------------------------
|
||||
|
||||
require_once( DOC_IPS_ROOT_PATH . 'converge_local/apis/additional_methods.php' );
|
||||
require_once( DOC_IPS_ROOT_PATH . 'converge_local/apis/additional_methods.php' );/*noLibHook*/
|
||||
$extension = new additional_methods( $this->registry );
|
||||
|
||||
if ( is_callable( array( $extension, $getdata_key ) ) )
|
||||
|
||||
Reference in new issue
Block a user