diff options
author | Dries Buytaert <dries@buytaert.net> | 2010-08-14 03:15:01 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2010-08-14 03:15:01 +0000 |
commit | 0a481a7899ee903994a2c9cf3c8cc7bc9b9bf5f6 (patch) | |
tree | 547038f8c47beada9840f0bfcde809349cc9eff1 /includes/common.inc | |
parent | 8f7eae302e5653b752e25d95ba1b5ba597727134 (diff) | |
download | brdo-0a481a7899ee903994a2c9cf3c8cc7bc9b9bf5f6.tar.gz brdo-0a481a7899ee903994a2c9cf3c8cc7bc9b9bf5f6.tar.bz2 |
- Patch #881536 by sun, pwolanin: cannot pass drupal_http_request() options into xmlrpc() function.
Diffstat (limited to 'includes/common.inc')
-rw-r--r-- | includes/common.inc | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/includes/common.inc b/includes/common.inc index 2a14c2c26..412c8df04 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -6747,16 +6747,22 @@ function entity_form_submit_build_entity($entity_type, $entity, $form, &$form_st /** * Performs one or more XML-RPC request(s). * + * Usage example: + * @code + * $result = xmlrpc('http://example.com/xmlrpc.php', array( + * 'service.methodName' => array($parameter, $second, $third), + * )); + * @endcode + * * @param $url * An absolute URL of the XML-RPC endpoint. - * Example: - * http://www.example.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. + * @param $args + * An associative array whose keys are the methods to call and whose values + * are the arguments to pass to the respective method. If multiple methods + * are specified, a system.multicall is performed. + * @param $options + * (optional) An array of options to pass along to drupal_http_request(). + * * @return * For one request: * Either the return value of the method on success, or FALSE. @@ -6766,10 +6772,9 @@ function entity_form_submit_build_entity($entity_type, $entity, $form, &$form_st * returned by the method called, or an xmlrpc_error object if the call * failed. See xmlrpc_error(). */ -function xmlrpc($url) { +function xmlrpc($url, $args, $options = array()) { require_once DRUPAL_ROOT . '/includes/xmlrpc.inc'; - $args = func_get_args(); - return call_user_func_array('_xmlrpc', $args); + return _xmlrpc($url, $args, $options); } /** |