Fixed error in tree view (meta and strict user with tags). Ticket #3437

This commit is contained in:
Arturo Gonzalez 2016-03-02 15:27:44 +01:00
parent 7483d131e7
commit ed117e3d50
1 changed files with 5 additions and 3 deletions

View File

@ -2092,19 +2092,21 @@ 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;