Permalink
Browse files

Minor mnet bugfixes

  • Loading branch information...
1 parent f4c0f3d commit 304182d210611d12b9e18c7632690672c8fad63e donal72 committed Aug 2, 2007
Showing with 7 additions and 3 deletions.
  1. +7 −3 mnet/xmlrpc/server.php
View
@@ -360,8 +360,12 @@ function mnet_server_dispatch($payload) {
exit(mnet_server_fault(713, 'nosuchfunction'));
}
- $callstack = explode('/', $method);
- // callstack will look like array('mod', 'forum', 'lib', 'forum_add_instance');
+ if(preg_match("/^system./", $method)) {
+ $callstack = explode('.', $method);
+ } else {
+ $callstack = explode('/', $method);
+ // callstack will look like array('mod', 'forum', 'lib.php', 'forum_add_instance');
+ }
/**
* What has the site administrator chosen as his dispatcher setting?
@@ -479,7 +483,7 @@ function mnet_server_dispatch($payload) {
// The call stack holds the path to any include file
$includefile = $CFG->dirroot.'/'.implode('/',$callstack).'/'.$filename.'.php';
- $response = mnet_server_invoke_function($includefile, $functionname, $method, $payload);
+ $response = mnet_server_invoke_method($includefile, $functionname, $method, $payload);
echo $response;
}

0 comments on commit 304182d

Please sign in to comment.