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

Author: Lars Michelsen <[email protected]>
Date:   Wed Dec 22 00:33:11 2010 +0100

More efficient version checking

---

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

diff --git a/share/server/core/classes/GlobalBackendmklivestatus.php 
b/share/server/core/classes/GlobalBackendmklivestatus.php
index ddf0f79..5ad4883 100644
--- a/share/server/core/classes/GlobalBackendmklivestatus.php
+++ b/share/server/core/classes/GlobalBackendmklivestatus.php
@@ -814,7 +814,7 @@ class GlobalBackendmklivestatus implements 
GlobalBackendInterface {
                $arrReturn = Array();
                if(is_array($l) && count($l) > 0) {
                        // livestatus previous 1.1.9i3 answers without 
host_alias - these users should update.
-                       if(count($l[0]) == 13)
+                       if(!isset($l[0][13]))
                                throw new BackendInvalidResponse(
                                        
GlobalCore::getInstance()->getLang()->getText('Livestatus version used in 
backend [BACKENDID] is too old. Please update.',
                                                                                
            Array('BACKENDID' => $this->backendId)));
@@ -923,7 +923,7 @@ class GlobalBackendmklivestatus implements 
GlobalBackendInterface {
                $arrReturn = Array();
                if(is_array($l) && count($l) > 0) {
                        // livestatus previous 1.1.9i3 answers without 
hostgroup_alias - these users should update.
-                       if(count($l[0]) == 10)
+                       if(!isset($l[0][10]))
                                throw new BackendInvalidResponse(
                                        
GlobalCore::getInstance()->getLang()->getText('Livestatus version used in 
backend [BACKENDID] is too old. Please update.',
                                                                                
            Array('BACKENDID' => $this->backendId)));
@@ -1166,7 +1166,7 @@ class GlobalBackendmklivestatus implements 
GlobalBackendInterface {
                $arrReturn = Array();
                if(is_array($l) && count($l) > 0) {
                        // livestatus previous 1.1.9i3 answers without 
servicegroup_alias - these users should update.
-                       if(count($l[0]) == 13)
+                       if(!isset($l[0][13]))
                                throw new BackendInvalidResponse(
                                        
GlobalCore::getInstance()->getLang()->getText('Livestatus version used in 
backend [BACKENDID] is too old. Please update.',
                                                                                
            Array('BACKENDID' => $this->backendId)));


------------------------------------------------------------------------------
Forrester recently released a report on the Return on Investment (ROI) of
Google Apps. They found a 300% ROI, 38%-56% cost savings, and break-even
within 7 months.  Over 3 million businesses have gone Google with Google Apps:
an online email calendar, and document program that's accessible from your 
browser. Read the Forrester report: http://p.sf.net/sfu/googleapps-sfnew
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins

Reply via email to