Commit 50db1a47 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Allow custom xmlrpc functions to be defined in /local


Signed-off-by: default avatarRichard Mansfield <richardm@catalyst.net.nz>
parent d4df1f4a
......@@ -156,6 +156,13 @@ class Dispatcher {
throw new XmlrpcServerException('The function does not exist', 6011);
}
// Read custom xmlrpc functions from local
if (function_exists('local_xmlrpc_services')) {
foreach (local_xmlrpc_services() as $name => $localservices) {
$this->services[$name] = array_merge($this->services[$name], $localservices);
}
}
foreach ($this->services as $container) {
if (array_key_exists($this->method, $container)) {
$xmlrpcserver = xmlrpc_server_create();
......
......@@ -5,7 +5,10 @@
* For simple customisation of a Mahara site, the core code will call some local_* functions
* which may be defined in this file.
*
* - Define the function local_main_nav_update(&$menu) to modify the main navigation menu in the header.
* Functions that will be called by core:
* - local_main_nav_update(&$menu): modify the main navigation menu in the header
* - local_xmlrpc_services(): add custom xmlrpc functions
* - local_can_remove_viewtype($viewtype): stop users from deleting views of a particular type
*/
?>
\ No newline at end of file
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