From f95017850a515969190f54df3d57a00449245bb9 Mon Sep 17 00:00:00 2001 From: Dominik Eckelmann Date: Sun, 8 Jan 2012 18:37:59 +0100 Subject: delegate file and date transformation to remote library --- lib/exe/xmlrpc.php | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lib/exe/xmlrpc.php') diff --git a/lib/exe/xmlrpc.php b/lib/exe/xmlrpc.php index 9888c9a61..44b4ba7a0 100644 --- a/lib/exe/xmlrpc.php +++ b/lib/exe/xmlrpc.php @@ -27,6 +27,8 @@ class dokuwiki_xmlrpc_server extends IXR_Server { */ function dokuwiki_xmlrpc_server(){ $this->remote = new RemoteAPI(); + $this->remote->setDateTransformation(array($this, 'toDate')); + $this->remote->setFileTransformation(array($this, 'toFile')); $this->IXR_Server(); } @@ -47,6 +49,14 @@ class dokuwiki_xmlrpc_server extends IXR_Server { } } + function toDate($data) { + return new IXR_Date($data); + } + + function toFile($data) { + return new IXR_Base64($data); + } + } $server = new dokuwiki_xmlrpc_server(); -- cgit v1.2.3