Version 3.4.5

This commit is contained in:
Neo committed 2025-12-19 00:38:12 -08:00
1 parent fb6b5baabc
commit e4478369d8
1360 files changed
+228921 -179445

No files matched your search

+53 -65
View File
@@ -3,17 +3,17 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* IP.Board v3.4.5
* Remote API Server
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* Last Updated: $Date: 2013-03-21 17:38:09 -0400 (Thu, 21 Mar 2013) $
* </pre>
*
* @author $Author: bfarber $
* @author $Author: AndyMillne $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @link http://www.invisionpower.com
* @version $Rev: 10914 $
* @version $Rev: 12109 $
*
*/
@@ -92,6 +92,13 @@ class API_Server
if ( $this->__authenticate( $api_key, $api_module, 'fetchOnlineUsers' ) !== FALSE )
{
//-----------------------------------------
// Add log
//-----------------------------------------
$this->addLogging( $api_key );
if ( !ipsRegistry::$settings['au_cutoff'] )
{
ipsRegistry::$settings[ 'au_cutoff'] = 15 ;
@@ -232,6 +239,12 @@ class API_Server
if ( $this->__authenticate( $api_key, $api_module, 'fetchStats' ) !== FALSE )
{
//-----------------------------------------
// Add log
//-----------------------------------------
$this->addLogging( $api_key );
$stats = $this->registry->cache()->getCache('stats');
$most_time = ipsRegistry::getClass('class_localization')->getDate( $stats['most_date'], 'LONG' );
@@ -281,6 +294,13 @@ class API_Server
if ( $this->__authenticate( $api_key, $api_module, 'helloBoard' ) !== FALSE )
{
//-----------------------------------------
// Add log
//-----------------------------------------
$this->addLogging( $api_key );
//-----------------------------------------
// Upgrade history?
//-----------------------------------------
@@ -318,11 +338,10 @@ class API_Server
* @param string $member_key Member key to check for
* @param integer $forum_id Forum id to post in
* @param string $topic_title Topic title
* @param string $topic_description Topic description
* @param string $post_content Posted content
* @return string xml
*/
public function postTopic( $api_key, $api_module, $member_field, $member_key, $forum_id, $topic_title, $topic_description, $post_content )
public function postTopic( $api_key, $api_module, $member_field, $member_key, $forum_id, $topic_title, $post_content )
{
//-----------------------------------------
// INIT
@@ -346,21 +365,14 @@ class API_Server
// Add log
//-----------------------------------------
if ( ipsRegistry::$settings['xmlrpc_log_type'] != 'failed' )
{
$this->registry->DB()->insert( 'api_log', array( 'api_log_key' => $api_key,
'api_log_ip' => $_SERVER['REMOTE_ADDR'],
'api_log_date' => time(),
'api_log_query' => $this->classApiServer->raw_request,
'api_log_allowed' => 1 ) );
}
$this->addLogging( $api_key );
//-----------------------------------------
// Member field...
//-----------------------------------------
$member = IPSMember::load( $member_key, 'all', $member_field );
//-----------------------------------------
// Got a member?
//-----------------------------------------
@@ -459,14 +471,7 @@ class API_Server
// Add log
//-----------------------------------------
if ( ipsRegistry::$settings['xmlrpc_log_type'] != 'failed' )
{
$this->registry->DB()->insert( 'api_log', array( 'api_log_key' => $api_key,
'api_log_ip' => $_SERVER['REMOTE_ADDR'],
'api_log_date' => time(),
'api_log_query' => $this->classApiServer->raw_request,
'api_log_allowed' => 1 ) );
}
$this->addLogging( $api_key );
//-----------------------------------------
// Member field...
@@ -573,14 +578,7 @@ class API_Server
// Add log
//-----------------------------------------
if ( ipsRegistry::$settings['xmlrpc_log_type'] != 'failed' )
{
$this->registry->DB()->insert( 'api_log', array( 'api_log_key' => $api_key,
'api_log_ip' => $_SERVER['REMOTE_ADDR'],
'api_log_date' => time(),
'api_log_query' => $this->classApiServer->raw_request,
'api_log_allowed' => 1 ) );
}
$this->addLogging( $api_key );
//-----------------------------------------
// Fetch forum list
@@ -632,14 +630,7 @@ class API_Server
// Add log
//-----------------------------------------
if ( ipsRegistry::$settings['xmlrpc_log_type'] != 'failed' )
{
$this->registry->DB()->insert( 'api_log', array( 'api_log_key' => $api_key,
'api_log_ip' => $_SERVER['REMOTE_ADDR'],
'api_log_date' => time(),
'api_log_query' => $this->classApiServer->raw_request,
'api_log_allowed' => 1 ) );
}
$this->addLogging( $api_key );
$member = IPSMember::load( $search_string, 'all', $search_type );
@@ -681,14 +672,7 @@ class API_Server
// Add log
//-----------------------------------------
if ( ipsRegistry::$settings['xmlrpc_log_type'] != 'failed' )
{
$this->registry->DB()->insert( 'api_log', array( 'api_log_key' => $api_key,
'api_log_ip' => $_SERVER['REMOTE_ADDR'],
'api_log_date' => time(),
'api_log_query' => $this->classApiServer->raw_request,
'api_log_allowed' => 1 ) );
}
$this->addLogging( $api_key );
//-----------------------------------------
// Get some classes
@@ -742,14 +726,7 @@ class API_Server
// Add log
//-----------------------------------------
if ( ipsRegistry::$settings['xmlrpc_log_type'] != 'failed' )
{
$this->registry->DB()->insert( 'api_log', array( 'api_log_key' => $api_key,
'api_log_ip' => $_SERVER['REMOTE_ADDR'],
'api_log_date' => time(),
'api_log_query' => $this->classApiServer->raw_request,
'api_log_allowed' => 1 ) );
}
$this->addLogging( $api_key );
//-----------------------------------------
// Get some classes
@@ -790,7 +767,7 @@ class API_Server
* @param bool $view_as_guest Treat user as a guest
* @return string xml
*/
public function fetchTopics( $api_key, $api_module, $forum_ids, $order_field, $order_by, $offset, $limit, $view_as_guest )
public function fetchTopics( $api_key, $api_module, $forum_ids, $order_field, $order_by, $offset, $limit, $view_as_guest, $parse_display )
{
//-----------------------------------------
// INIT
@@ -804,6 +781,7 @@ class API_Server
$offset = intval( $offset );
$limit = intval( $limit );
$view_as_guest = intval( $view_as_guest );
$parse_display = intval( $parse_display );
//-----------------------------------------
// Authenticate
@@ -815,14 +793,7 @@ class API_Server
// Add log
//-----------------------------------------
if ( ipsRegistry::$settings['xmlrpc_log_type'] != 'failed' )
{
$this->registry->DB()->insert( 'api_log', array( 'api_log_key' => $api_key,
'api_log_ip' => $_SERVER['REMOTE_ADDR'],
'api_log_date' => time(),
'api_log_query' => $this->classApiServer->raw_request,
'api_log_allowed' => 1 ) );
}
$this->addLogging( $api_key );
//-----------------------------------------
// Get API classes
@@ -841,7 +812,7 @@ class API_Server
$topic_view->topic_list_config['offset'] = $offset;
$topic_view->topic_list_config['limit'] = $limit;
$topics = $topic_view->return_topic_list_data( $view_as_guest );
$topics = $topic_view->return_topic_list_data( $view_as_guest, $parse_display );
//-----------------------------------------
// Return the data
@@ -851,6 +822,23 @@ class API_Server
exit();
}
}
/**
* Adds logging obviously :)
*
* @param string $api_key Authentication Key
*/
public function addLogging( $api_key )
{
if ( ipsRegistry::$settings['xmlrpc_log_type'] != 'failed' )
{
$this->registry->DB()->insert( 'api_log', array( 'api_log_key' => $api_key,
'api_log_ip' => $_SERVER['REMOTE_ADDR'],
'api_log_date' => time(),
'api_log_query' => $this->classApiServer->raw_request,
'api_log_allowed' => 1 ) );
}
}
/**
* Checks to see if the request is allowed
@@ -3,9 +3,9 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* IP.Board v3.4.5
* Remote API Server configuration
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre>
*
* @author $Author: bfarber $
@@ -13,7 +13,7 @@
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @link http://www.invisionpower.com
* @version $Rev: 10914 $
* @version $Rev: 10721 $
*
*/
@@ -3,17 +3,17 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* IP.Board v3.4.5
* Defines the allowed methods a remote server may request and the in/out parameters
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* Last Updated: $Date: 2013-03-21 17:38:09 -0400 (Thu, 21 Mar 2013) $
* </pre>
*
* @author $Author: bfarber $
* @author $Author: AndyMillne $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @link http://www.invisionpower.com
* @version $Rev: 10914 $
* @version $Rev: 12109 $
*
*/
@@ -50,6 +50,7 @@ $ALLOWED_METHODS['fetchTopics'] = array(
'offset' => 'integer',
'limit' => 'integer',
'view_as_guest' => 'integer',
'parse_display' => 'integer',
),
'out' => array(
'response' => 'xmlrpc'
@@ -125,7 +126,6 @@ $ALLOWED_METHODS['postTopic'] = array(
'member_key' => 'string',
'forum_id' => 'integer',
'topic_title' => 'string',
'topic_description' => 'string',
'post_content' => 'string',
),
'out' => array(