Change reflection methods to only report on methods that are being published to the inquiring host (instead of all methods that could be published). MDL-10214, MDL-10174, MDL-10172, MDL-10171

This commit is contained in:
donal72 2007-10-17 08:08:12 +00:00
parent 82f66bed7b
commit f633d85d72

View File

@ -542,7 +542,8 @@ function mnet_system($method, $params, $hostinfo) {
WHERE
s2r.rpcid = rpc.id AND
h2s.serviceid = s2r.serviceid AND
h2s.hostid in ('.$id_list .')
h2s.hostid in ('.$id_list .') AND
h2s.publish =\'1\'
ORDER BY
rpc.xmlrpc_path ASC';
@ -563,6 +564,7 @@ function mnet_system($method, $params, $hostinfo) {
s2r.rpcid = rpc.id AND
h2s.serviceid = s2r.serviceid AND
h2s.hostid in ('.$id_list .') AND
h2s.publish =\'1\' AND
svc.id = h2s.serviceid AND
svc.name = \''.$params[0].'\'
ORDER BY
@ -591,6 +593,7 @@ function mnet_system($method, $params, $hostinfo) {
rpc.xmlrpc_path = \''.$params[0].'\' AND
s2r.rpcid = rpc.id AND
h2s.serviceid = s2r.serviceid AND
h2s.publish =\'1\' AND
h2s.hostid in ('.$id_list .')';
$result = get_records_sql($query);
@ -618,6 +621,7 @@ function mnet_system($method, $params, $hostinfo) {
WHERE
rpc.xmlrpc_path = \''.$params[0].'\' AND
s2r.rpcid = rpc.id AND
h2s.publish =\'1\' AND
h2s.serviceid = s2r.serviceid AND
h2s.hostid in ('.$id_list .')';
@ -639,6 +643,7 @@ function mnet_system($method, $params, $hostinfo) {
'.$CFG->prefix.'mnet_service s
WHERE
h2s.serviceid = s.id AND
(h2s.publish =\'1\' OR h2s.subscribe =\'1\') AND
h2s.hostid in ('.$id_list .')
ORDER BY
s.name ASC';