Commit 711af54d authored by Ad Schellevis's avatar Ad Schellevis

add _xmlrpc prefix handling to core xmlrpc server

parent 9a65d54f
...@@ -39,6 +39,8 @@ class XMLRPCServer ...@@ -39,6 +39,8 @@ class XMLRPCServer
* every usable module should include a function to return it's own registrable functions, using * every usable module should include a function to return it's own registrable functions, using
* the following patten: * the following patten:
* xmlrpc_publishable_{filename without .inc} * xmlrpc_publishable_{filename without .inc}
*
* when functions wrap around a local variant with the same name, suffix with _xmlrpc (which will be stripped off)
*/ */
private function loadPlugins() private function loadPlugins()
{ {
...@@ -48,7 +50,8 @@ class XMLRPCServer ...@@ -48,7 +50,8 @@ class XMLRPCServer
$publ_func = "xmlrpc_publishable_" .str_replace(".inc", "", basename($filename)); $publ_func = "xmlrpc_publishable_" .str_replace(".inc", "", basename($filename));
if (function_exists($publ_func)) { if (function_exists($publ_func)) {
foreach ($publ_func() as $function) { foreach ($publ_func() as $function) {
$this->xmlrpc_callbacks[$this->prefix.".".$function] = $function; $publish_name = $this->prefix.".".str_replace("_xmlrpc", "", $function);
$this->xmlrpc_callbacks[$publish_name] = $function;
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment