Code

Updated Quota progress bar.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 11 Dec 2008 06:46:05 +0000 (06:46 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 11 Dec 2008 06:46:05 +0000 (06:46 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13247 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/mail/personal/mail/class_mail-methods.inc

index d2d76936dd510e98f98424b5f01747d2ff18d77a..0908fb1cb23031c58ca571bae35c2bc551bf679d 100644 (file)
@@ -728,12 +728,13 @@ class mailMethod{
 
   static function quota_to_image($use,$quota)
   {
-    if($use == -1 ){ 
-      return(_("Unknown"));
-    }elseif($quota == 0){
-      return(progressbar(100,100,15,true));
+    if($use == -1){
+      return("&nbsp;&nbsp;"._("Unknown"));
+    }elseif(empty($quota)){
+      return("&nbsp;&nbsp;"._("Unlimited"));
     }else{
-      return(progressbar(round(($use * 100)/ $quota),100,15,true));
+      $usage =(int) ($use/$quota) * 100;
+      return("<img src='progress.php?x=100&amp;y=17&amp;p=$usage'>");
     }
   }
 }