Index: branches/2.2/expressoMail1_2/inc/class.imap_functions.inc.php
===================================================================
--- branches/2.2/expressoMail1_2/inc/class.imap_functions.inc.php	(revision 4583)
+++ branches/2.2/expressoMail1_2/inc/class.imap_functions.inc.php	(revision 4587)
@@ -52,5 +52,5 @@
 	function open_mbox($folder = False,$force_die=true)
 	{
-		$folder = mb_convert_encoding($folder, "UTF7-IMAP","ISO_8859-1");
+		$folder = mb_convert_encoding($folder, "UTF7-IMAP","ISO-8859-1");
 		if (is_resource($this->mbox))
                 {
@@ -120,5 +120,5 @@
 		
 		if(!$search_box_type || $search_box_type=="UNSEEN" || $search_box_type=="SEEN") {
-			$msgs_info = imap_status($this->mbox,"{".$this->imap_server.":".$this->imap_port.$this->imap_options."}".mb_convert_encoding( $folder, "UTF7-IMAP", "ISO_8859-1" ) ,SA_ALL);
+			$msgs_info = imap_status($this->mbox,"{".$this->imap_server.":".$this->imap_port.$this->imap_options."}".mb_convert_encoding( $folder, "UTF7-IMAP", "ISO-8859-1" ) ,SA_ALL);
 
 
@@ -335,5 +335,5 @@
 		$invalid_format = false;
 		$filename = $params['FILES'][0]['name'];
-		$params["folder"] = mb_convert_encoding($params["folder"], "UTF7-IMAP","ISO_8859-1");
+		$params["folder"] = mb_convert_encoding($params["folder"], "UTF7-IMAP","ISO-8859-1");
 		$quota = imap_get_quotaroot($this->mbox, $params["folder"]);
 		if((($quota['limit'] - $quota['usage'])*1024) <= $params['FILES'][0]['size']){
@@ -1809,5 +1809,5 @@
                             if( $Permission )     
                             {    
-                                $tmp_folder_id[1] = mb_convert_encoding( $tmp_folder_id[1], "ISO_8859-1", "UTF7-IMAP" );
+                                $tmp_folder_id[1] = mb_convert_encoding( $tmp_folder_id[1], "ISO-8859-1", "UTF7-IMAP" );
 
                                 if( $tmp_folder_id[1]=='INBOX'.$this->imap_delimiter.'decifradas') 
@@ -2119,5 +2119,5 @@
 		}
 		
-		$folder = mb_convert_encoding($folder, "UTF7-IMAP","ISO_8859-1");
+		$folder = mb_convert_encoding($folder, "UTF7-IMAP","ISO-8859-1");
 		$folder_name = $params['folder_name'];
 		// Fix problem with cyrus delimiter changes.
@@ -2637,5 +2637,5 @@
 		$mbox_stream = $this->open_mbox($folder);
 		$newmailbox = ($params['new_folder']);
-		$newmailbox = mb_convert_encoding($newmailbox, "UTF7-IMAP","ISO_8859-1");
+		$newmailbox = mb_convert_encoding($newmailbox, "UTF7-IMAP","ISO-8859-1");
 		$new_folder_name = $params['new_folder_name'];
 		$msgs_number = $params['msgs_number'];
@@ -2763,5 +2763,5 @@
 
 		$folder = $params['folder'];
-		$folder = mb_convert_encoding($folder, "UTF7-IMAP","ISO_8859-1");
+		$folder = mb_convert_encoding($folder, "UTF7-IMAP","ISO-8859-1");
 		// Fix problem with cyrus delimiter changes.
 		// Dots in names: enabled/disabled.
@@ -3494,5 +3494,5 @@
 				}
 				
-				$name_box = mb_convert_encoding(utf8_decode($name_box), "UTF7-IMAP", "ISO_8859-1" );
+				$name_box = mb_convert_encoding(utf8_decode($name_box), "UTF7-IMAP", "ISO-8859-1" );
 				$filter = $this->remove_accents($filter);
 
@@ -3510,5 +3510,5 @@
 				}
 				else
-					$folder_name = mb_convert_encoding(utf8_decode($name_box), "UTF7-IMAP", "ISO_8859-1" );
+					$folder_name = mb_convert_encoding(utf8_decode($name_box), "UTF7-IMAP", "ISO-8859-1" );
 				
 				if(!is_resource($mbox_stream))
@@ -3533,5 +3533,5 @@
 							{
 								$elem = $this->get_msg_detail($new_search,$name_box,$mbox_stream); 
-								$elem['boxname'] = mb_convert_encoding( $name_box, "ISO_8859-1", "UTF7-IMAP" ); 
+								$elem['boxname'] = mb_convert_encoding( $name_box, "ISO-8859-1", "UTF7-IMAP" ); 
 								$elem['uid'] = $new_search; 
 								/* compare dates in ordering */
@@ -3578,5 +3578,5 @@
 						{
 							$elem = $this->get_msg_detail($new_search,$name_box,$mbox_stream); 
-							$elem['boxname'] = mb_convert_encoding( $name_box, "ISO_8859-1", "UTF7-IMAP" ); 
+							$elem['boxname'] = mb_convert_encoding( $name_box, "ISO-8859-1", "UTF7-IMAP" ); 
 							$elem['uid'] = $new_search; 
 							/* compare dates in ordering */
@@ -3760,6 +3760,5 @@
                             foreach ($mailboxes_list as $key => $val)
                             {
-                                $folder = str_replace($serverString, "", imap_utf7_decode($val->name));
-                                $folder = str_replace("&-", "&", $folder);
+                                $folder = str_replace($serverString, "", $val->name);
                                 imap_setacl ($mbox_stream, $folder, "$uid", "");
                             }
@@ -4095,5 +4094,5 @@
 		    $quota_used = str_replace(")","",$size); 
 		    $quotaPercent = (($quota_used / 1024) / $data["quota_root"]["quota_limit"])*100; 
-		    $folder = mb_convert_encoding($folder, "ISO_8859-1", "UTF7-IMAP"); 
+		    $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 = $this->functions->getLang("Inbox"); 
