summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--_test/index.php2
-rw-r--r--inc/load.php2
-rw-r--r--inc/remote.php15
3 files changed, 17 insertions, 2 deletions
diff --git a/_test/index.php b/_test/index.php
index f59c44cf4..64ece4762 100644
--- a/_test/index.php
+++ b/_test/index.php
@@ -11,7 +11,7 @@ if(@file_exists(DOKU_CONF.'local.php')){ require_once(DOKU_CONF.'local.php'); }
$conf['lang'] = 'en';
define('TEST_ROOT', dirname(__FILE__));
define('TMPL_FILESCHEME_PATH', TEST_ROOT . '/filescheme/');
-error_reporting(E_ALL);
+error_reporting(E_ALL & ~E_DEPRECATED);
set_time_limit(600);
ini_set('memory_limit','128M');
diff --git a/inc/load.php b/inc/load.php
index b69d58140..3f1f3429f 100644
--- a/inc/load.php
+++ b/inc/load.php
@@ -76,10 +76,12 @@ function load_autoload($name){
'SafeFN' => DOKU_INC.'inc/SafeFN.class.php',
'Sitemapper' => DOKU_INC.'inc/Sitemapper.php',
'PassHash' => DOKU_INC.'inc/PassHash.class.php',
+ 'RemoteAPI' => DOKU_INC.'inc/remote.php',
'DokuWiki_Action_Plugin' => DOKU_PLUGIN.'action.php',
'DokuWiki_Admin_Plugin' => DOKU_PLUGIN.'admin.php',
'DokuWiki_Syntax_Plugin' => DOKU_PLUGIN.'syntax.php',
+ 'DokuWiki_Remote_Plugin' => DOKU_PLUGIN.'remote.php',
);
diff --git a/inc/remote.php b/inc/remote.php
index ea5e23af3..13a38aa17 100644
--- a/inc/remote.php
+++ b/inc/remote.php
@@ -17,6 +17,7 @@ if (!defined('DOKU_INC')) die();
* 'args' => array(
* 'type' => 'string|int|...',
* )
+ * 'return' => 'type'
* )
* )
*
@@ -102,8 +103,20 @@ class RemoteAPI {
*/
public function getPluginMethods() {
if ($this->pluginMethods === null) {
- // TODO: find plugin methods
$this->pluginMethods = array();
+ $plugins = plugin_list('remote');
+
+ foreach ($plugins as $pluginName) {
+ $plugin = plugin_load('remote', $pluginName);
+ if (!is_subclass_of($plugin, 'DokuWiki_Remote_Plugin')) {
+ throw new RemoteException("Plugin $pluginName dose not implement DokuWiki_Remote_Plugin");
+ }
+
+ $methods = $plugin->_getMethods();
+ foreach ($methods as $method => $meta) {
+ $this->pluginMethods["plugin.$pluginName.$method"] = $meta;
+ }
+ }
}
return $this->pluginMethods;
}