diff options
Diffstat (limited to 'includes/common.inc')
-rw-r--r-- | includes/common.inc | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/includes/common.inc b/includes/common.inc index c9b61d402..993e0354a 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -1826,6 +1826,34 @@ function drupal_implode_autocomplete($array) { return implode('||', $output); } +/** +* Performs one or more XML-RPC request(s). +* +* @param $url +* An absolute URL of the XML-RPC endpoint. +* Example: +* http://www.domain.com/xmlrpc.php +* @param ... +* For one request: +* The method name followed by a variable number of arguments to the method. +* For multiple requests (system.multicall): +* An array of call arrays. Each call array follows the pattern of the single +* request: method name followed by the arguments to the method. +* @return +* For one request: +* Either the return value of the method on success, or FALSE. +* If FALSE is returned, see xmlrpc_errno() and xmlrpc_error_msg(). +* For multiple requests: +* An array of results. Each result will either be the result +* returned by the method called, or an xmlrpc_error object if the call +* failed. See xmlrpc_error(). +*/ +function xmlrpc($url) { + require_once './includes/xmlrpc.inc'; + $args = func_get_args(); + return call_user_func_array('_xmlrpc', $args); +} + function _drupal_bootstrap_full() { static $called; global $locale; @@ -1840,7 +1868,6 @@ function _drupal_bootstrap_full() { require_once './includes/tablesort.inc'; require_once './includes/file.inc'; require_once './includes/unicode.inc'; - require_once './includes/xmlrpc.inc'; require_once './includes/image.inc'; // Set the Drupal custom error handler. set_error_handler('error_handler'); |