From a5490ca8369ebbcb67d23ce9ae8a9b79db77f3a0 Mon Sep 17 00:00:00 2001 From: alec Date: Wed, 22 Apr 2009 06:48:01 +0000 Subject: - fix 1px rectangle fill when mailbox is empty (used=0) git-svn-id: https://svn.roundcube.net/trunk@2413 208e9e7b-5314-0410-a742-e7e81cd9613c --- roundcubemail/bin/quotaimg.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/roundcubemail/bin/quotaimg.php b/roundcubemail/bin/quotaimg.php index 31f5cd6f2..fc3997a39 100644 --- a/roundcubemail/bin/quotaimg.php +++ b/roundcubemail/bin/quotaimg.php @@ -172,7 +172,8 @@ function genQuota($used, $total, $width, $height) } $quota_width = $quota / 100 * $width; - imagefilledrectangle($im, $border, 0, $quota_width, $height-2*$border, $fill); + if ($quota_width) + imagefilledrectangle($im, $border, 0, $quota_width, $height-2*$border, $fill); $string = $quota . '%'; $mid = floor(($width-(strlen($string)*imagefontwidth($font)))/2)+1; -- cgit v1.2.3