parent
9a460b9a70
commit
1e5a620017
1 changed files with 27 additions and 27 deletions
@ -1,30 +1,30 @@ |
|||||||
diff -Nur -x '*.orig' -x '*.rej' zabbix-3.4.9/frontends/php/include/classes/api/services/CItemGeneral.php mezzanine_patched_zabbix-3.4.9/frontends/php/include/classes/api/services/CItemGeneral.php
|
diff -Nur -x '*.orig' -x '*.rej' zabbix-3.4.9/frontends/php/include/classes/api/services/CItemGeneral.php mezzanine_patched_zabbix-3.4.9/frontends/php/include/classes/api/services/CItemGeneral.php
|
||||||
--- zabbix-3.4.9/frontends/php/include/classes/api/services/CItemGeneral.php 2018-05-09 11:57:42.000000000 +0200
|
--- zabbix-3.4.9/frontends/php/include/classes/api/services/CItemGeneral.php 2018-05-09 11:57:42.000000000 +0200
|
||||||
+++ mezzanine_patched_zabbix-3.4.9/frontends/php/include/classes/api/services/CItemGeneral.php 2018-05-29 11:25:39.130154434 +0200
|
+++ mezzanine_patched_zabbix-3.4.9/frontends/php/include/classes/api/services/CItemGeneral.php 2018-05-29 11:25:39.130154434 +0200
|
||||||
@@ -1630,7 +1630,7 @@
|
@@ -1630,7 +1630,7 @@
|
||||||
$master_itemids = [];
|
$master_itemids = [];
|
||||||
|
|
||||||
foreach ($items as $item) {
|
foreach ($items as $item) {
|
||||||
- if ($item['type'] == ITEM_TYPE_DEPENDENT) {
|
- if ($item['type'] == ITEM_TYPE_DEPENDENT) {
|
||||||
+ if ($item['type'] == ITEM_TYPE_DEPENDENT && array_key_exists('master_itemid', $item)) {
|
+ if ($item['type'] == ITEM_TYPE_DEPENDENT && array_key_exists('master_itemid', $item)) {
|
||||||
$master_itemids[$item['master_itemid']] = true;
|
$master_itemids[$item['master_itemid']] = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1645,7 +1645,7 @@
|
@@ -1645,7 +1645,7 @@
|
||||||
$host_master_items = [];
|
$host_master_items = [];
|
||||||
|
|
||||||
foreach ($items as $item) {
|
foreach ($items as $item) {
|
||||||
- if ($item['type'] != ITEM_TYPE_DEPENDENT) {
|
- if ($item['type'] != ITEM_TYPE_DEPENDENT) {
|
||||||
+ if ($item['type'] == ITEM_TYPE_DEPENDENT && array_key_exists('master_itemid', $item)) {
|
+ if ($item['type'] == ITEM_TYPE_DEPENDENT && array_key_exists('master_itemid', $item)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$master_item = $master_items[$item['master_itemid']];
|
$master_item = $master_items[$item['master_itemid']];
|
||||||
@@ -1653,7 +1653,7 @@
|
@@ -1653,7 +1653,7 @@
|
||||||
if (!array_key_exists($item['hostid'], $host_master_items)) {
|
if (!array_key_exists($item['hostid'], $host_master_items)) {
|
||||||
$host_master_items[$item['hostid']] = [];
|
$host_master_items[$item['hostid']] = [];
|
||||||
}
|
}
|
||||||
- if ($master_item['hostid'] != $item['hostid']) {
|
- if ($master_item['hostid'] != $item['hostid']) {
|
||||||
+ if (bccomp($master_item['hostid'], $item['hostid']) != 0) {
|
+ if (bccomp($master_item['hostid'], $item['hostid']) != 0) {
|
||||||
if (!array_key_exists($master_item['key_'], $host_master_items[$item['hostid']])) {
|
if (!array_key_exists($master_item['key_'], $host_master_items[$item['hostid']])) {
|
||||||
$inherited_master_items = DB::select('items', [
|
$inherited_master_items = DB::select('items', [
|
||||||
'output' => ['itemid'],
|
'output' => ['itemid'],
|
||||||
|
Loading…
Reference in new issue