summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--frontends/php/include/classes.inc.php4
-rw-r--r--frontends/php/include/config.inc.php2
-rw-r--r--frontends/php/map.php6
-rw-r--r--frontends/php/sysmap.php4
4 files changed, 8 insertions, 8 deletions
diff --git a/frontends/php/include/classes.inc.php b/frontends/php/include/classes.inc.php
index a01470f6..094badca 100644
--- a/frontends/php/include/classes.inc.php
+++ b/frontends/php/include/classes.inc.php
@@ -54,7 +54,7 @@
function initColors()
{
// I should rename No Alpha to Alpha at some point to get rid of some confusion
- if(function_exists("ImageColorExactAlpha")&&function_exists("ImageCreateTrueColor"))
+ if(function_exists("ImageColorExactAlpha")&&function_exists("ImageCreateTrueColor")&&@imagecreatetruecolor(1,1))
{
$this->colors["Red"]= ImageColorExactAlpha($this->im,255,0,0,50);
$this->colors["Dark Red"]= ImageColorExactAlpha($this->im,150,0,0,50);
@@ -505,7 +505,7 @@
check_authorisation();
- if(function_exists("ImageColorExactAlpha")&&function_exists("ImageCreateTrueColor"))
+ if(function_exists("ImageColorExactAlpha")&&function_exists("ImageCreateTrueColor")&&@imagecreatetruecolor(1,1))
{
$this->im = ImageCreateTrueColor($this->sizeX+$this->shiftX+61,$this->sizeY+$this->shiftY+62+12*$this->num+8);
}
diff --git a/frontends/php/include/config.inc.php b/frontends/php/include/config.inc.php
index 5d9024f0..2f23c18d 100644
--- a/frontends/php/include/config.inc.php
+++ b/frontends/php/include/config.inc.php
@@ -4943,7 +4943,7 @@ where h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=$triggerid";
if( ($status==0)||($status==2))
{
- if(function_exists("imagecreatetruecolor"))
+ if(function_exists("imagecreatetruecolor")&&@imagecreatetruecolor(1,1))
{
$map=$map."\n<area shape=rect coords=$x,$y,".($x+48).",".($y+48)." href=\"tr_status.php?hostid=$hostid&noactions=true&onlytrue=true&compact=true\" alt=\"$host\">";
}
diff --git a/frontends/php/map.php b/frontends/php/map.php
index 4d60c7a6..56e60937 100644
--- a/frontends/php/map.php
+++ b/frontends/php/map.php
@@ -40,7 +40,7 @@
check_authorisation();
- if(function_exists("imagecreatetruecolor"))
+ if(function_exists("imagecreatetruecolor")&&@imagecreatetruecolor(1,1))
{
$im = imagecreatetruecolor($width,$height);
}
@@ -135,7 +135,7 @@
$x2=DBget_field($result1,0,0);
$y2=DBget_field($result1,0,1);
- if(function_exists("imagecreatetruecolor"))
+ if(function_exists("imagecreatetruecolor")&&@imagecreatetruecolor(1,1))
{
$size=48/2;
}
@@ -203,7 +203,7 @@
if(@gettype($icons["$icon"])!="resource")
{
- if(function_exists("imagecreatetruecolor"))
+ if(function_exists("imagecreatetruecolor")&&@imagecreatetruecolor(1,1))
{
$icons[$icon]=ImageCreateFromPNG("images/sysmaps/$icon.png");
}
diff --git a/frontends/php/sysmap.php b/frontends/php/sysmap.php
index 0c7e77bf..60102b8e 100644
--- a/frontends/php/sysmap.php
+++ b/frontends/php/sysmap.php
@@ -95,7 +95,7 @@
$y_=DBget_field($result,$i,6);
$status_=DBget_field($result,$i,7);
- if(function_exists("imagecreatetruecolor"))
+ if(function_exists("imagecreatetruecolor")&&@imagecreatetruecolor(1,1))
{
$map=$map."\n<area shape=rect coords=$x_,$y_,".($x_+48).",".($y_+48)." href=\"sysmap.php?sysmapid=$sysmapid_&shostid=$shostid_#form\" alt=\"$host_\">";
}
@@ -271,7 +271,7 @@
show_table2_h_delimiter();
echo "<select class=\"biginput\" name=\"icon\" size=1>";
$icons=array();
- if(function_exists("imagecreatetruecolor"))
+ if(function_exists("imagecreatetruecolor")&&@imagecreatetruecolor(1,1))
{
$icons[0]="Server";
$icons[1]="Workstation";