From 0e8da486996838bd3bd9ab36e44de2b690ba027d Mon Sep 17 00:00:00 2001 From: hugetoad Date: Sat, 20 Nov 2004 11:02:57 +0000 Subject: Minor change. git-svn-id: svn://svn.zabbix.com/trunk@1496 97f52cf1-0a1b-0410-bd0e-c28be96e8082 --- frontends/php/map.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'frontends/php/map.php') diff --git a/frontends/php/map.php b/frontends/php/map.php index 73c04652..15f2cc86 100644 --- a/frontends/php/map.php +++ b/frontends/php/map.php @@ -282,10 +282,13 @@ // imagecolortransparent ($img, 0, 0, 0); ImageCopy($im,$img,$x,$y,0,0,ImageSX($img),ImageSY($img)); - $x1=$x+ImageSX($img)/2-ImageFontWidth(2)*strlen($label)/2; - $y1=$y+ImageSY($img); - ImageFilledRectangle($im,$x1-2, $y1,$x1+ImageFontWidth(2)*strlen($label), $y1+ImageFontHeight(2),$white); - ImageString($im, 2, $x1, $y1, $label,$black); + if($label!="") + { + $x1=$x+ImageSX($img)/2-ImageFontWidth(2)*strlen($label)/2; + $y1=$y+ImageSY($img); + ImageFilledRectangle($im,$x1-2, $y1,$x1+ImageFontWidth(2)*strlen($label), $y1+ImageFontHeight(2),$white); + ImageString($im, 2, $x1, $y1, $label,$black); + } if($status == 1) { -- cgit