- 
    Incident report 
- 
    Resolution: Fixed
- 
    Critical 
- 
    1.8.1
- 
    None
- 
    None
- 
    apache-2.2.3-11,php-5.1.6, MySQL 5.0.45
When access to Overview screen with View Data mode,
The mapping value (eg: Host status: Up (0)) is incorrect, it always get the string of previous host.
I debugged in the web source code and find the problem in function replace_value_by_map (at /php/include/config.inc.php)
It should be fixed as following:
function replace_value_by_map($value, $valuemapid){
		if($valuemapid < 1) return $value;
		static $valuemaps = array();
		if(isset($valuemaps[$valuemapid][$value])) return $valuemaps[$valuemapid][$value];
		$sql = 'SELECT newvalue '.
				' FROM mappings '.
				' WHERE valuemapid='.$valuemapid.
					' AND value='.zbx_dbstr($value);
		$result = DBselect($sql);
		if($row = DBfetch($result))
	return $value;
	}