Version 3.2.3

This commit is contained in:
Neo committed 2025-12-19 00:34:03 -08:00
1 parent ae5c01cc78
commit 78706903a2
2641 files changed
+228363 -201264

No files matched your search

+25 -73
View File
@@ -3,17 +3,17 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.1.4
* IP.Board v3.2.3
* Remote API Server
* Last Updated: $Date: 2010-10-23 08:40:34 -0400 (Sat, 23 Oct 2010) $
* Last Updated: $Date: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
* </pre>
*
* @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
* @link http://www.invisionpower.com
* @version $Rev: 7023 $
* @link http://hatynka.in
* @version $Rev: 8644 $
*
*/
@@ -22,7 +22,6 @@ class API_Server
/**
* Defines the service for WSDL
*
* @access public
* @var array
*/
public $__dispatch_map = array();
@@ -30,15 +29,13 @@ class API_Server
/**
* IPS Global Class
*
* @access private
* @var object
*/
private $registry;
protected $registry;
/**
* IPS API SERVER Class
*
* @access public
* @var object
*/
public $classApiServer;
@@ -46,9 +43,8 @@ class API_Server
/**
* Constructor
*
* @access public
* @return void
**/
* @return @e void
*/
public function __construct( $registry )
{
//-----------------------------------------
@@ -62,7 +58,7 @@ class API_Server
// list
//-----------------------------------------
$ALLOWED_METHODS = array();
require_once( DOC_IPS_ROOT_PATH . 'interface/board/modules/ipb/methods.php' );
require_once( DOC_IPS_ROOT_PATH . 'interface/board/modules/ipb/methods.php' );/*noLibHook*/
if ( is_array( $ALLOWED_METHODS ) and count( $ALLOWED_METHODS ) )
{
@@ -76,12 +72,11 @@ class API_Server
/**
* Returns the list of online users
*
* @access public
* @param string $api_key Authentication Key
* @param string $api_module Module
* @param string $sep_character Separator character
* @return string xml
**/
*/
public function fetchOnlineUsers( $api_key, $api_module, $sep_character=',' )
{
//-----------------------------------------
@@ -97,9 +92,9 @@ class API_Server
if ( $this->__authenticate( $api_key, $api_module, 'fetchOnlineUsers' ) !== FALSE )
{
if ( !$this->settings['au_cutoff'] )
if ( !ipsRegistry::$settings['au_cutoff'] )
{
$this->settings[ 'au_cutoff'] = 15 ;
ipsRegistry::$settings[ 'au_cutoff'] = 15 ;
}
$cut_off = ipsRegistry::$settings['au_cutoff'] * 60;
@@ -148,18 +143,7 @@ class API_Server
if ( ! $cached[ $result['member_name'] ] )
{
if ( ipsRegistry::$settings['spider_anon'] )
{
if ( $this->registry->member()->getProperty('g_access_cp') )
{
$active['NAMES'][] = $result['member_name'];
}
}
else
{
$active['NAMES'][] = $result['member_name'];
}
$active['NAMES'][] = $result['member_name'];
$cached[ $result['member_name'] ] = 1;
}
else
@@ -191,11 +175,11 @@ class API_Server
{
$cached[ $result['member_id'] ] = 1;
$result['member_name'] = IPSLib::makeNameFormatted( $result['member_name'], $result['member_group'] );
$result['member_name'] = IPSMember::makeNameFormatted( $result['member_name'], $result['member_group'] );
if ( ! ipsRegistry::$settings['disable_anonymous'] AND $result['login_type'] )
{
if ( $this->registry->member()->getProperty('g_access_cp') and (ipsRegistry::$settings['disable_admin_anon'] != 1) )
if ( $this->registry->member()->getProperty('g_access_cp') )
{
$active['NAMES'][] = "<a href='" . $this->registry->getClass('output')->buildSEOUrl( "showuser={$result['member_id']}", 'public', $result['seo_name'], 'showuser' ) . "' title='$last_date'>{$result['member_name']}</a>*";
$active['ANON']++;
@@ -228,7 +212,6 @@ class API_Server
/**
* Returns details about the board
*
* @access public
* @param string $api_key Authentication Key
* @param string $api_module Module
* @return string xml
@@ -278,7 +261,6 @@ class API_Server
/**
* Returns hello board test
*
* @access public
* @param string $api_key Authentication Key
* @param string $api_module Module
* @return string xml
@@ -320,7 +302,7 @@ class API_Server
'upload_url' => ipsRegistry::$settings['upload_url'],
'ipb_img_url' => ipsRegistry::$settings['ipb_img_url'],
'board_human_version' => $latest_version['upgrade_version_human'],
'board_long_version' => ( isset($latest_version['upgrade_notes']) AND $latest_version['upgrade_notes'] ) ? $latest_version['upgrade_notes'] : ipsRegistry::$vn_full ) );
'board_long_version' => !empty($latest_version['upgrade_notes']) ? $latest_version['upgrade_notes'] : ipsRegistry::$vn_full ) );
exit();
}
@@ -329,7 +311,6 @@ class API_Server
/**
* Posts a topic to the board remotely
*
* @access public
* @param string $api_key Authentication Key
* @param string $api_module Module
* @param string $member_field Member field to check (valid: "id", "email", "username", "displayname")
@@ -351,7 +332,6 @@ class API_Server
$member_field = IPSText::parseCleanValue( $member_field );
$member_key = IPSText::parseCleanValue( $member_key );
$topic_title = IPSText::parseCleanValue( $topic_title );
$topic_description = IPSText::parseCleanValue( $topic_description );
$forum_id = intval( $forum_id );
$UNCLEANED_post_content = $post_content;
@@ -393,10 +373,9 @@ class API_Server
// Get some classes
//-----------------------------------------
require_once( IPSLib::getAppDir( 'forums' ) . '/app_class_forums.php' );
$appClass = new app_class_forums( $this->registry );
ipsRegistry::getAppClass( 'forums' );
require_once( IPSLib::getAppDir( 'forums' ) . '/sources/classes/post/classPost.php' );
require_once( IPSLib::getAppDir( 'forums' ) . '/sources/classes/post/classPost.php' );/*noLibHook*/
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . '/sources/classes/post/classPostForms.php', 'classPostForms', 'forums' );
$_postClass = new $classToLoad( $this->registry );
@@ -419,8 +398,7 @@ class API_Server
'post_htmlstatus' => 0,
'enableTracker' => 0 ) );
$_postClass->setTopicTitle( $topic_title );
$_postClass->setTopicDescription( $topic_description );
# Switch off perm checks
$_postClass->setBypassPermissionCheck(true);
/**
@@ -449,7 +427,6 @@ class API_Server
/**
* Posts a topic reply
*
* @access public
* @param string $api_key Authentication Key
* @param string $api_module Module
* @param string $member_field Member field to check (valid: "id", "email", "username", "displayname")
@@ -509,10 +486,9 @@ class API_Server
// Get some classes
//-----------------------------------------
require_once( IPSLib::getAppDir( 'forums' ) . '/app_class_forums.php' );
$appClass = new app_class_forums( $this->registry );
ipsRegistry::getAppClass( 'forums' );
require_once( IPSLib::getAppDir( 'forums' ) . '/sources/classes/post/classPost.php' );
require_once( IPSLib::getAppDir( 'forums' ) . '/sources/classes/post/classPost.php' );/*noLibHook*/
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . '/sources/classes/post/classPostForms.php', 'classPostForms', 'forums' );
$_postClass = new $classToLoad( $this->registry );
@@ -569,7 +545,6 @@ class API_Server
/**
* Returns a member
*
* @access public
* @param string $api_key Authentication Key
* @param string $api_module Module
* @param string $search_type Member field to check (valid: "id", "email", "username", "displayname")
@@ -629,7 +604,6 @@ class API_Server
/**
* Check if a member exists
*
* @access public
* @param string $api_key Authentication Key
* @param string $api_module Module
* @param string $search_type Member field to check (valid: "id", "email", "username", "displayname")
@@ -681,7 +655,6 @@ class API_Server
* Fetch the forum options list.
* WARNING: Last two options are deprecated and no longer supported. All viewable forums returned. User is automatically treated like a guest.
*
* @access public
* @param string $api_key Authentication Key
* @param string $api_module Module
* @param string $selected_forum_ids Comma separated list of forum ids
@@ -720,8 +693,7 @@ class API_Server
// Get some classes
//-----------------------------------------
require_once( IPSLib::getAppDir( 'forums' ) . '/app_class_forums.php' );
$appClass = new app_class_forums( $this->registry );
ipsRegistry::getAppClass( 'forums' );
//-----------------------------------------
// Fetch forum list
@@ -742,7 +714,6 @@ class API_Server
* Returns the board's forums.
* WARNING: Last option is deprecated and no longer supported. User is automatically treated like a guest.
*
* @access public
* @param string $api_key Authentication Key
* @param string $api_module Module
* @param string $forum_ids Comma separated list of forum ids
@@ -783,8 +754,7 @@ class API_Server
// Get some classes
//-----------------------------------------
require_once( IPSLib::getAppDir( 'forums' ) . '/app_class_forums.php' );
$appClass = new app_class_forums( $this->registry );
ipsRegistry::getAppClass( 'forums' );
//-----------------------------------------
// Fetch forum list
@@ -809,7 +779,6 @@ class API_Server
/**
* Returns topics based on request params
*
* @access public
* @param string $api_key Authentication Key
* @param string $api_module Module
* @param string $forum_ids Comma separated list of forum ids
@@ -858,8 +827,8 @@ class API_Server
// Get API classes
//-----------------------------------------
require_once( IPS_ROOT_PATH . '/api/forums/api_topic_view.php' );
$topic_view = new apiTopicView();
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . '/api/forums/api_topic_view.php', 'apiTopicView' );
$topic_view = new $classToLoad();
//-----------------------------------------
// Fetch topic list
@@ -881,26 +850,10 @@ class API_Server
exit();
}
}
/**
* Has to return at least the member ID, member log in key and session ID
*
* @access private
* @param array $member Array of member information
* @return array $session Session information
* @deprecated Session is automatically created via instantiating ipsRegistry
*/
private function __create_user_session( $member )
{
return $this->registry->member()->fetchMemberData();
}
/**
* Routine to create a local user account
*
* @access protected
* @param string $email_address Email address of user logged in
* @param string $md5_once_password The plain text password, hashed once
* @param string $ip_address IP Address of registree
@@ -950,7 +903,6 @@ class API_Server
/**
* Checks to see if the request is allowed
*
* @access protected
* @param string $api_key Authenticate Key
* @param string $api_module Module
* @param string $api_function Function