When we use a map in which we have an other map as an object, and if they are 1 error (not more) in the more deep map, status may be OK : the recursion use the same variable in each loop, and can lose information of 1 problème.
When we are more probleme, info is not important and probleme is not visible.
This patch make a temporary variable in order to memorize when a problem occur. The temporary variable is uniq and may be re-writen in a loop, but its result are only important in the case of 1 problem.
When we are more probleme, info is not important and probleme is not visible.
This patch make a temporary variable in order to memorize when a problem occur. The temporary variable is uniq and may be re-writen in a loop, but its result are only important in the case of 1 problem.
Code:
diff -uwBb zabbix-1.1-orig/frontends/php/include/maps.inc.php zabbix-1.1/frontends/php/include/maps.inc.php
--- zabbix-1.1-orig/frontends/php/include/maps.inc.php 2006-05-23 16:04:50.000000000 +0200
+++ zabbix-1.1/frontends/php/include/maps.inc.php 2006-07-12 15:27:12.000000000 +0200
@@ -291,8 +291,16 @@
" where sysmapid=".$db_element["elementid"]);
while($db_subelement = DBfetch($db_subelements))
{// recursion
- $count += get_info_by_selementid($db_subelement["selementid"],$info,$color);
+ $tmp = get_info_by_selementid($db_subelement["selementid"],$info,$color);
+ $count += $tmp;;
+ if($tmp)
+ {
+ $infotmp=$info;
+ $colortmp=$color;
+ }
}
+ $info=$infotmp;
+ $color=$colortmp;
if($count==0)
{
Sorts out one a few of my minor annoyances
, but is the original problem still present in latest version ?
Comment