Permalink
Browse files

Move functions of central antispam to core XML-RPC API file

  • Loading branch information...
1 parent 54dfe12 commit 3cdca4c94966b06fef5d8af4e4845287c77bd9e0 @yurabakhtin yurabakhtin committed Jun 20, 2016
Showing with 19 additions and 28 deletions.
  1. +18 −28 evonetsrv/xmlrpc.php → inc/xmlrpc/apis/_antispam.api.php
  2. +1 −0 xmlsrv/xmlrpc.php
@@ -1,14 +1,15 @@
<?php
-/*
- * EXPERIMENTAL
+/**
+ * XML-RPC : Central Antispam API
*
- * fplanque
+ * b2evolution - {@link http://b2evolution.net/}
+ * Released under GNU GPL License - {@link http://b2evolution.net/about/gnu-gpl-license}
+ * @copyright (c)2009-2016 by Francois Planque - {@link http://fplanque.com/}
+ *
+ * @package xmlsrv
*/
-$xmlrpc_logging = 0; // Set to 1 if you want to enable logging
+if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
-require_once dirname( __FILE__ ).'/../conf/_config.php';
-require_once $inc_path.'_main.inc.php';
-load_funcs( '/xmlrpc/model/_xmlrpc.funcs.php' );
### b2evo.reportabuse ###
@@ -166,6 +167,11 @@ function b2evoreportabuse( $m )
return new xmlrpcresp( new xmlrpcval( $return_string, 'string' ) );
}
+$xmlrpc_procs['b2evo.reportabuse'] = array(
+ 'function' => 'b2evoreportabuse',
+ 'signature' => $b2evoreportabuse_sig,
+ 'docstring' => $b2evoreportabuse_doc
+ );
### b2evo.pollabuse ###
@@ -239,24 +245,8 @@ function b2evopollabuse( $m )
return new xmlrpcresp( $response );
}
-
-/**** SERVER FUNCTIONS ARRAY ****/
-
-load_funcs( '/xmlrpc/model/_xmlrpcs.funcs.php' ); // This will add generic remote calls
-
-$s = new xmlrpc_server(
- array(
- 'b2evo.reportabuse' => array(
- 'function' => 'b2evoreportabuse',
- 'signature' => $b2evoreportabuse_sig,
- 'docstring' => $b2evoreportabuse_doc
- ),
- 'b2evo.pollabuse' => array(
- 'function' => 'b2evopollabuse',
- 'signature' => $b2evopollabuse_sig,
- 'docstring' => $b2evopollabuse_doc
- ),
- )
-);
-
-?>
+$xmlrpc_procs['b2evo.pollabuse'] = array(
+ 'function' => 'b2evopollabuse',
+ 'signature' => $b2evopollabuse_sig,
+ 'docstring' => $b2evopollabuse_doc
+ );
View
@@ -70,6 +70,7 @@
include_once $inc_path.'xmlrpc/apis/_metaweblog.api.php';
include_once $inc_path.'xmlrpc/apis/_mt.api.php';
include_once $inc_path.'xmlrpc/apis/_wordpress.api.php';
+include_once $inc_path.'xmlrpc/apis/_antispam.api.php';
// fp> xmlrpc.php should actually only load the function/api/plugin to execute once it has been identified

0 comments on commit 3cdca4c

Please sign in to comment.