Issue #1416212 by pontus_nilsson: Fixed _user_mail_notify() -- options for need...
[project/drupal.git] / xmlrpc.php
index 7bc237d..b202dc2 100644 (file)
@@ -1,16 +1,18 @@
 <?php
 
-include_once("includes/xmlrpcs.inc");
-include_once "includes/common.inc";
+/**
+ * @file
+ * PHP page for handling incoming XML-RPC requests from clients.
+ */
 
-$functions = array();
+/**
+ * Root directory of Drupal installation.
+ */
+define('DRUPAL_ROOT', getcwd());
 
-foreach (module_list() as $name) {
-  if (module_hook($name, "xmlrpc")) {
-    $functions = array_merge($functions, module_invoke($name, "xmlrpc"));
-  }
-}
+include_once DRUPAL_ROOT . '/includes/bootstrap.inc';
+drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
+include_once DRUPAL_ROOT . '/includes/xmlrpc.inc';
+include_once DRUPAL_ROOT . '/includes/xmlrpcs.inc';
 
-$server = new xmlrpc_server($functions);
-
-?>
+xmlrpc_server(module_invoke_all('xmlrpc'));