Module: nagvis Branch: master Commit: 8f98f3804acf75f5768e0d047948e1381893e96e URL: http://nagvis.git.sourceforge.net/git/gitweb.cgi?p=nagvis/nagvis/commit/?id=8f98f3804acf75f5768e0d047948e1381893e96e
Author: Roman Kyrylych <[email protected]> Date: Tue Aug 11 17:25:59 2009 +0300 gmap: Removed Location::getByFailedHosts() Signed-off-by: Roman Kyrylych <[email protected]> --- share/netmap/Location.php | 38 -------------------------------------- 1 files changed, 0 insertions(+), 38 deletions(-) diff --git a/share/netmap/Location.php b/share/netmap/Location.php index 9cf1fb4..eb15e52 100644 --- a/share/netmap/Location.php +++ b/share/netmap/Location.php @@ -247,44 +247,6 @@ class Location return $locations; } - - /** - * @param array $hosts - * @return array of Location - */ - public function getByFailedHosts($hosts = array()) - { - $result = array(); - $locations = $this->getAll(); - - $all_hosts = array(); - $failed_hosts = array(); - - if (($lines = file('hosts.all', FILE_IGNORE_NEW_LINES)) === FALSE) - throw new Exception('Could not read hosts.all'); - - foreach ($lines as $line) - { - $fields = explode('|', $line); - $all_hosts[$fields[0]] = $fields[1]; - } - - if (($lines = file('hosts.failed', FILE_IGNORE_NEW_LINES)) === FALSE) - throw new Exception('Could not read hosts.failed'); - - foreach ($lines as $line) - { - $fields = explode('|', $line); - $failed_hosts[$fields[0]] = false; /* dummy value, may be used in future */ - } - - foreach (array_unique(array_values(array_intersect_key($all, $failed))) as $location_id) - foreach ($locations as $location) - if ($location->id == $location_id) - $result[] = $location; - - return $result; - } } ?> ------------------------------------------------------------------------------ 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
