From b1c89b36edca4c10e4f020339bf3cb00bbb9bc6c Mon Sep 17 00:00:00 2001
From: zarzuelo <zarzuelo@gmail.com>
Date: Wed, 30 Nov 2011 14:30:09 +0000
Subject: [PATCH] 2011-11-30  Sergio Martin <sergio.martin@artica.es>

	* include/graphs/functions_gd.php: Fixed rounded corners
	progress bar whit mode=1 and ratio < 30



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5213 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
---
 pandora_console/ChangeLog                       | 5 +++++
 pandora_console/include/graphs/functions_gd.php | 7 +++++--
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog
index b2ea05a979..9afae8637c 100644
--- a/pandora_console/ChangeLog
+++ b/pandora_console/ChangeLog
@@ -1,3 +1,8 @@
+2011-11-30  Sergio Martin <sergio.martin@artica.es>
+
+	* include/graphs/functions_gd.php: Fixed rounded corners 
+	progress bar whit mode=1 and ratio < 30
+
 2011-11-30 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
 
 	* include/ajax/agent.php
diff --git a/pandora_console/include/graphs/functions_gd.php b/pandora_console/include/graphs/functions_gd.php
index 2071d04eb6..8a977aa269 100755
--- a/pandora_console/include/graphs/functions_gd.php
+++ b/pandora_console/include/graphs/functions_gd.php
@@ -229,9 +229,12 @@ function gd_progress_bar ($width, $height, $progress, $title, $font, $out_of_lim
 					ImageRectangleWithRoundedCorners($image, $x1, $y1, $x2, $y2, $radius,$red);
 				elseif ($rating == 100)
 					ImageRectangleWithRoundedCorners($image, $x1, $y1, $x2, $y2, $radius,$green);
-				else
+				else if($rating > 0){
+					if($radius != 0 && $rating < 30) {
+						$x2 = $ratingbar30;
+					}
 					ImageRectangleWithRoundedCorners($image, $x1, $y1, $x2, $y2, $radius,$blue);
-					
+				}	
 				
 				if ($rating > 50)
 					if ($rating > 100)