Module: nagvis
Branch: master
Commit: 3e331058b4adb393ec78b19ebac249a3ee951854
URL:    
http://nagvis.git.sourceforge.net/git/gitweb.cgi?p=nagvis/nagvis;a=commit;h=3e331058b4adb393ec78b19ebac249a3ee951854

Author: LaMi <[email protected]>
Date:   Sat Apr 10 11:32:39 2010 +0200

Some code compacting

---

 .../core/classes/GlobalBackendmklivestatus.php     |   10 +++-------
 1 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/share/server/core/classes/GlobalBackendmklivestatus.php 
b/share/server/core/classes/GlobalBackendmklivestatus.php
index abb9607..7b1ff8b 100644
--- a/share/server/core/classes/GlobalBackendmklivestatus.php
+++ b/share/server/core/classes/GlobalBackendmklivestatus.php
@@ -386,7 +386,9 @@ class GlobalBackendmklivestatus implements 
GlobalBackendInterface {
                
                switch($type) {
                        case 'host':
-                               $l = $this->queryLivestatus("GET 
hosts\nColumns: name alias\n");
+                       case 'hostgroup':
+                       case 'servicegroup':
+                               $l = $this->queryLivestatus("GET 
".$type."s\nColumns: name alias\n");
                        break;
                        case 'service':
                                $query = "GET services\nColumns: description 
description\n";
@@ -397,12 +399,6 @@ class GlobalBackendmklivestatus implements 
GlobalBackendInterface {
                                
                                $l = $this->queryLivestatus($query);
                        break;
-                       case 'hostgroup':
-                               $l = $this->queryLivestatus("GET 
hostgroups\nColumns: name alias\n");
-                       break;
-                       case 'servicegroup':
-                               $l = $this->queryLivestatus("GET 
servicegroups\nColumns: name alias\n");
-                       break;
                        default:
                                return Array();
                        break;


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins

Reply via email to