summaryrefslogtreecommitdiff
path: root/inc/IXR_Library.php
diff options
context:
space:
mode:
authorMichael Klier <chi@chimeric.de>2008-08-24 10:04:57 +0200
committerMichael Klier <chi@chimeric.de>2008-08-24 10:04:57 +0200
commitbb32615dd0cedc85fbbec5f1c76a3e57e40e318b (patch)
tree4108cead2076dd4324a87c93b33f40067da9828e /inc/IXR_Library.php
parentdfd13e55ad5658529ad92eb78ba4481a3a8ffc58 (diff)
downloadrpg-bb32615dd0cedc85fbbec5f1c76a3e57e40e318b.tar.gz
rpg-bb32615dd0cedc85fbbec5f1c76a3e57e40e318b.tar.bz2
XMLRPC: new event XMLRPC_CALLBACK_REGISTER
By using this event, action plugins can register their own callback methods in DokuWikis XML-RPC server, and extend it's functionality. The event data is the server instance. Plugins can also remove already registered callbacks or replace them with their own methods. darcs-hash:20080824080457-23886-b49b897592ce6717f0980f6044bae2d51fd73336.gz
Diffstat (limited to 'inc/IXR_Library.php')
-rw-r--r--inc/IXR_Library.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/inc/IXR_Library.php b/inc/IXR_Library.php
index c3c70b92c..fb11585ca 100644
--- a/inc/IXR_Library.php
+++ b/inc/IXR_Library.php
@@ -354,6 +354,15 @@ EOD;
// Call the method
#$result = $this->$method($args);
$result = call_user_func_array(array(&$this,$method),$args);
+ } elseif (substr($method, 0, 7) == 'plugin:') {
+ require_once(DOKU_INC.'inc/pluginutils.php');
+ list($pluginname, $callback) = explode(':', substr($method, 7), 2);
+ if(!plugin_isdisabled($pluginname)) {
+ $plugin = plugin_load('action', $pluginname);
+ return call_user_func_array(array($plugin, $callback), $args);
+ } else {
+ return new IXR_Error(-99999, 'server error');
+ }
} else {
// It's a function - does it exist?
if (!function_exists($method)) {