From 437d7b539f5def0e64275b51e137338979388164 Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez Date: Wed, 2 Mar 2016 15:25:40 +0100 Subject: [PATCH] Fixed error in tree view (meta and strict user with tags). Ticket3437 --- pandora_console/include/class/Tree.class.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pandora_console/include/class/Tree.class.php b/pandora_console/include/class/Tree.class.php index 52f236ce28..eda54f8d55 100644 --- a/pandora_console/include/class/Tree.class.php +++ b/pandora_console/include/class/Tree.class.php @@ -2092,19 +2092,20 @@ class Tree { $rootIDs = $this->rootID; $items = array(); + $j = 1; + $server = metaconsole_get_servers(); foreach ($rootIDs as $serverID => $rootID) { - $server = metaconsole_get_servers($serverID); - if (metaconsole_connect($server) != NOERR) + if (metaconsole_connect($server[$j]) != NOERR) continue; db_clean_cache(); $this->rootID = $rootID; $newItems = $this->getItems(); - $this->processAgents($newItems, $server); + $this->processAgents($newItems, $server[$j]); $newItems = array_filter($newItems); $items = array_merge($items, $newItems); - metaconsole_restore_db(); + $j++; } $this->rootID = $rootIDs;