Merge branch 'ent-3050-fallo-php-7-en-networks-maps' into 'develop'

Fixed php errors on radial networkmap

See merge request artica/pandorafms!1960
This commit is contained in:
vgilc 2018-11-12 16:49:58 +01:00
commit 9d896de41a
4 changed files with 7 additions and 6 deletions

View File

@ -4387,7 +4387,7 @@ function graph_monitor_wheel ($width = 550, $height = 600, $filter = false) {
$data_agents[$agent_id]['children'][$module_group_id]['children'][] = $data_module;
unset($modules[$module_id]);
}
function order_module_group_keys ($value, $key) {
function order_module_group_keys ($value) {
$value['children'] = array_merge($value['children']);
return $value;
}

View File

@ -1701,7 +1701,7 @@ function groups_get_tree_good (&$groups, $parent = false, &$childs) {
if ($parent === false && (!isset($group['parent']) || $group['parent'] == 0 || !in_array($group['parent'], $groups))) {
$return[$id] = $group;
//unset($groups[$id]);
$children = groups_get_tree_good($groups, $id);
$children = groups_get_tree_good($groups, $id, $noUse);
if (!empty($children)) {
$return[$id]['children'] = $children;
@ -1713,7 +1713,7 @@ function groups_get_tree_good (&$groups, $parent = false, &$childs) {
else if ($parent && isset($group['parent']) && $group['parent'] == $parent) {
$return[$id] = $group;
//unset($groups[$id]);
$children = groups_get_tree_good($groups, $id);
$children = groups_get_tree_good($groups, $id, $noUse);
if (!empty($children)) {
$return[$id]['children'] = $children;

View File

@ -18,10 +18,11 @@
global $config;
check_login ();
if (_id_ != "_id_") {
if (defined('_id_') && _id_ != "_id_") {
$id = _id_;
}
else {
define("_id_", "_id_");
$id = get_parameter('id_networkmap', true);
}
@ -36,8 +37,7 @@ if (enterprise_installed()) {
$activeTab = $tab;
}
}
if (_activeTab_ != "_activeTab_") {
if (defined("_activeTab_") && _activeTab_ != "_activeTab_") {
$activeTab = _activeTab_;
$tab = $activeTab;
}

View File

@ -445,6 +445,7 @@ switch ($tab) {
if (enterprise_installed()) {
$old_networkmaps_enterprise = db_get_all_rows_sql("SELECT * FROM tnetworkmap_enterprise");
if ($old_networkmaps_enterprise === false) $old_networkmaps_enterprise = array();
}
$old_networkmaps_open = db_get_all_rows_sql("SELECT * FROM tnetwork_map");