Index: /branches/2.3/expressoMail1_2/inc/class.imap_functions.inc.php
===================================================================
--- /branches/2.3/expressoMail1_2/inc/class.imap_functions.inc.php	(revision 6482)
+++ /branches/2.3/expressoMail1_2/inc/class.imap_functions.inc.php	(revision 6508)
@@ -4346,16 +4346,17 @@
 
 	    $data = array();
-            $quota_root = $this->get_quota(array('folder_id' => "INBOX"));
-	    $data["quota_root"] = $quota_root;
+                $quota_root = $this->get_quota(array('folder_id' => "INBOX"));
+                $data["quota_root"] = $quota_root;
 
 	    foreach ($response_array as $idx=>$line) { 
 		    $line2 = str_replace('"', "", $line); 
 		    $line2 = str_replace(" /vendor/cmu/cyrus-imapd/size (value.shared ",";",str_replace("* ANNOTATION ","",$line2)); 
-		    list($folder,$size) = explode(";",$line2); 
-		    $quota_used = str_replace(")","",$size); 
+		    list($folder,$size) = explode(";",$line2);
+		   
                     $quota=$this->get_quotaroot(array('folder' => $folder));
+                    $isroot=(strpos($quota['quota_root'],$folder)!==false);
+                    $quota_used = $isroot?$quota['quota_used']*1024:str_replace(")","",$size); 
                     $hasquota=($quota['quota_root']!="");
-                    $isroot=(strpos($quota['quota_root'],$folder)!==false);
-		    $quotaPercent = ($hasquota?(($quota_used / 1024) / $quota['quota_limit'])*100:0); 
+            	    $quotaPercent = ($hasquota?(($quota_used / 1024) / $quota['quota_limit'])*100:0); 
 		    $folder = mb_convert_encoding($folder, "ISO_8859-1", "UTF7-IMAP"); 
 		    if(!preg_match('/user\\'.$this->imap_delimiter.$this->username.'\\'.$this->imap_delimiter.'/i',$folder)){ 
@@ -4375,5 +4376,5 @@
 	    include_once("class.imapfp.inc.php");            
 	    $imapfp = new imapfp(); 
-
+                
 	    if(!$imapfp->open($this->imap_server,$this->imap_port)) 
 		    return $imapfp->get_error();             
@@ -4387,21 +4388,14 @@
 	    $data = array();
 
-	    foreach ($response_array as $idx=>$line) { 
-		    $line2 = str_replace('"', "", $line); 
+	    foreach ($response_array as $idx=>$line) {
+                    if($idx == 0)
+                        continue;
+                    $line2 = str_replace('"', "", $line); 
 		    $line2 = str_replace(" /vendor/cmu/cyrus-imapd/size (value.shared ",";",str_replace("* ANNOTATION ","",$line2)); 
-		    list($folder,$size) = explode(";",$line2); 
-		    $quota_used = str_replace(")","",$size); 
+		    list($folder,$size) = explode(";",$line2);
                     $quota=$this->get_quotaroot(array('folder' => $folder));
-                    $hasquota=($quota['quota_limit']!="");
                     $isroot=(strpos($quota['quota_root'],$folder)!==false);
                     if($isroot){
-                        $quotaPercent = ($hasquota?(($quota_used / 1024) / $quota['quota_limit'])*100:0); 
-                        $folder = mb_convert_encoding($folder, "ISO_8859-1", "UTF7-IMAP"); 
-                        if(preg_match('/user\\'.$this->imap_delimiter.$this->username.'\\'.$this->imap_delimiter.'/i',$folder)){ 
-                             $folder = preg_replace('/user\\'.$this->imap_delimiter.$this->username.'\\'.$this->imap_delimiter.'/i','', $folder); 
-                             $data[$folder] = array("quota_percent" => ($hasquota?sprintf("%.1f",round($quotaPercent,1)):''), "quota_used" => $quota_used, "quota_limit" => ($isroot && $folder!=$this->functions->getLang("Inbox")?$quota['quota_limit']:'')); 
-                             return $data;
-                        } 
-                        
+                        return $quota;
                     }
 	    } 
Index: /branches/2.3/expressoMail1_2/js/draw_api.js
===================================================================
--- /branches/2.3/expressoMail1_2/js/draw_api.js	(revision 6492)
+++ /branches/2.3/expressoMail1_2/js/draw_api.js	(revision 6508)
@@ -3436,15 +3436,11 @@
             td12.setAttribute("noWrap","true");
             td12.innerHTML += '&nbsp;<span class="boxHeaderText"> de ' + borkb(q_limit*1024)+"</span>";
-//            tr2.appendChild(td10);
             tr2.appendChild(td11);
             tr2.appendChild(td12);
-            //----------------
-            for(folder in data['quota_folder']){
-                folderName = "Arquivo Remoto";
-                qFolderUsed = data['quota_folder'][folder]['quota_used'];
-                qFolderLimit = data['quota_folder'][folder]['quota_limit'];
-                qfolderPercent = data['quota_folder'][folder]['quota_percent'];
-            }
-            
+            folderName = "Arquivo Remoto";
+            qFolderUsed = data['quota_folder']['quota_used'];
+            qFolderLimit = data['quota_folder']['quota_limit'];
+            qfolderPercent = data['quota_folder']['quota_percent'];
+         
             td20 = document.createElement("TD");
             td20.setAttribute("noWrap","true");
