Module: nagvis Branch: master Commit: defb755d6e8cdb30874fc771331742dc2b6d5416 URL: http://nagvis.git.sourceforge.net/git/gitweb.cgi?p=nagvis/nagvis/nagvis;a=commit;h=defb755d6e8cdb30874fc771331742dc2b6d5416
Author: Roman Kyrylych <[email protected]> Date: Thu Sep 3 18:04:45 2009 +0300 Return false for unknown {host,service}groupName to distinguish from empty group Signed-off-by: Roman Kyrylych <[email protected]> --- .../includes/classes/GlobalBackendmerlinmy.php | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/share/nagvis/includes/classes/GlobalBackendmerlinmy.php b/share/nagvis/includes/classes/GlobalBackendmerlinmy.php index 1b914cc..458bb85 100755 --- a/share/nagvis/includes/classes/GlobalBackendmerlinmy.php +++ b/share/nagvis/includes/classes/GlobalBackendmerlinmy.php @@ -598,7 +598,9 @@ class GlobalBackendmerlinmy implements GlobalBackendInterface { .' LEFT JOIN hostgroup AS hg ON hg.id = hhg.hostgroup' ." WHERE hg.hostgroup_name = '$hostgroupName'"); - if(mysql_num_rows($QUERYHANDLE)) { + if(mysql_num_rows($QUERYHANDLE) == 0) { + $arrReturn = false; + } else { while($data = mysql_fetch_array($QUERYHANDLE)) { $arrRow = Array('name' => $data['host_name']); @@ -675,7 +677,9 @@ class GlobalBackendmerlinmy implements GlobalBackendInterface { .' LEFT JOIN servicegroup AS sg ON sg.id = ssg.servicegroup' ." WHERE sg.servicegroup_name = '$servicegroupName'"); - if(mysql_num_rows($QUERYHANDLE)) { + if(mysql_num_rows($QUERYHANDLE) == 0) { + $arrReturn = false; + } else { while($data = mysql_fetch_array($QUERYHANDLE)) { $arrRow = Array('host'] => $data['host_name'], 'description' => $data['service_description']); ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Nagvis-checkins mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nagvis-checkins
