NOMDL mnet: do not display 'All Hosts' in the Network servers block
authorDavid Mudrak <david.mudrak@gmail.com>
Fri, 10 Dec 2010 22:18:26 +0000 (22:18 +0000)
committerDavid Mudrak <david.mudrak@gmail.com>
Fri, 10 Dec 2010 22:18:26 +0000 (22:18 +0000)
blocks/mnet_hosts/block_mnet_hosts.php

index ea5aa99..1af74ac 100644 (file)
@@ -85,6 +85,7 @@ class block_mnet_hosts extends block_list {
                  {mnet_host2service} h2s_SP,
                  {mnet_service} s_SP
              WHERE
+                 h.id <> ? AND
                  h.id <> ? AND
                  h.id = h2s_IDP.hostid AND
                  h.deleted = 0 AND
@@ -100,7 +101,7 @@ class block_mnet_hosts extends block_list {
                  a.display_name,
                  h.name";
 
-        $hosts = $DB->get_records_sql($sql, array($CFG->mnet_localhost_id));
+        $hosts = $DB->get_records_sql($sql, array($CFG->mnet_localhost_id, $CFG->mnet_all_hosts_id));
 
         $this->content = new stdClass();
         $this->content->items = array();