Module: nagvis Branch: master Commit: f046a49e86c159913957d5dc254247d3a713ad40 URL: http://nagvis.git.sourceforge.net/git/gitweb.cgi?p=nagvis/nagvis/commit/?id=f046a49e86c159913957d5dc254247d3a713ad40
Author: Roman Kyrylych <[email protected]> Date: Tue Aug 11 17:03:37 2009 +0300 gmap: Location class should instantiate Database instead of trying use it as static class Signed-off-by: Roman Kyrylych <[email protected]> --- share/netmap/Location.php | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/share/netmap/Location.php b/share/netmap/Location.php index 315cab1..9cf1fb4 100644 --- a/share/netmap/Location.php +++ b/share/netmap/Location.php @@ -210,6 +210,8 @@ class Location if (($xml = @simplexml_load_file('locations.xml')) === FALSE) throw new Exception('Could not read locations.xml'); + $db = new Database(); + $locations = array(); foreach ($xml->location as $node) { @@ -221,19 +223,19 @@ class Location switch (get_class($location->object)) { case 'Host': - $location->state = Database::getHostState($location->object); + $location->state = $db->getHostState($location->object); break; case 'HostGroup': - $location->state = Database::getHostGroupState($location->object); + $location->state = $db->getHostGroupState($location->object); break; case 'Service': - $location->state = Database::getServiceState($location->object); + $location->state = $db->getServiceState($location->object); break; case 'ServiceGroup': - $location->state = Database::getServiceGroupState($location->object); + $location->state = $db->getServiceGroupState($location->object); break; default: ------------------------------------------------------------------------------ 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
