]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-15933 Require jump destination MNET peer to be non-deleted.
authorpeterbulmer <peterbulmer>
Mon, 11 Aug 2008 04:48:00 +0000 (04:48 +0000)
committerpeterbulmer <peterbulmer>
Mon, 11 Aug 2008 04:48:00 +0000 (04:48 +0000)
Also require landing source MNET peer to be non-deleted.

auth/mnet/auth.php

index 5859c07f4240f7dacc8f094fc51f424116a22e60..159b702e472549162a272d27ee321b0eda6f08d7 100644 (file)
@@ -241,7 +241,7 @@ class auth_plugin_mnet extends auth_plugin_base {
         require_once $CFG->dirroot . '/mnet/xmlrpc/client.php';
 
         // verify the remote host is configured locally before attempting RPC call
-        if (! $remotehost = $DB->get_record('mnet_host', array('wwwroot'=>$remotewwwroot))) {
+        if (! $remotehost = $DB->get_record('mnet_host', array('wwwroot' => $remotewwwroot, 'deleted' => 0))) {
             print_error('notpermittedtoland', 'mnet');
         }
 
@@ -1302,9 +1302,12 @@ class auth_plugin_mnet extends auth_plugin_base {
                 svc.apiversion,
                 h2s.id as h2s_id
             FROM
+                {mnet_host} h,
                 {mnet_service} svc,
                 {mnet_host2service} h2s
             WHERE
+                h.deleted = '0' AND
+                h.id = h2s.hostid AND
                 h2s.hostid = ? AND
                 h2s.serviceid = svc.id AND
                 svc.name = ? AND