Changeset 8016 for branches/2.5
- Timestamp:
- 03/14/13 17:40:23 (11 years ago)
- Location:
- branches/2.5
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.5/expressoMail1_2/inc/class.imap_functions.inc.php
r7919 r8016 2638 2638 function ren_mailbox($arr) 2639 2639 { 2640 $namebox = $arr['current']; 2641 $new_box = $arr['rename']; 2640 $namebox = $arr['current']; 2641 $path_delimiter = strrpos($namebox,$this->imap_delimiter)+1; 2642 $base_path = substr($namebox,0,$path_delimiter); 2643 $rename = preg_split("/\/|\./",substr($arr['rename'], $path_delimiter)); 2644 $new_box = array_shift($rename); 2645 $subfolders = $rename; 2642 2646 $imap_server = $_SESSION['phpgw_info']['expressomail']['email_server']['imapServer']; 2643 2647 $mbox_stream = $this->open_mbox(); 2644 //$ren_folder = imap_renamemailbox($mbox_stream,"{".$imap_server."}INBOX.$namebox","{".$imap_server."}INBOX.$new_box");2645 2646 2648 $result = "Ok"; 2647 2649 $namebox = mb_convert_encoding($namebox, "UTF7-IMAP","UTF-8"); 2648 $new_box = mb_convert_encoding($ new_box, "UTF7-IMAP","UTF-8");2650 $new_box = mb_convert_encoding($base_path.$new_box, "UTF7-IMAP","UTF-8"); 2649 2651 2650 2652 if(!imap_renamemailbox($mbox_stream,"{".$imap_server."}$namebox","{".$imap_server."}$new_box")) … … 2652 2654 $result = imap_last_error(); 2653 2655 } 2656 /*Cria as subpastas*/ 2657 if (is_array($subfolders)){ 2658 $child = $new_box.$this->imap_delimiter; 2659 $subfolders_count = count($subfolders); 2660 for($i =0; $i < $subfolders_count; ++$i){ 2661 $child .= ($subfolders[$i] ? $subfolders[$i] : $this->functions->getLang("New Folder")); 2662 $namebox = mb_convert_encoding($child, "UTF7-IMAP", "UTF-8"); 2663 $result = "Ok"; 2664 if(!imap_createmailbox($mbox_stream,"{".$imap_server."}$namebox")) 2665 { 2666 $result = imap_last_error(); 2667 } 2668 $child .=$this->imap_delimiter; 2669 } 2670 } 2671 2654 2672 if($mbox_stream) 2655 2673 imap_close($mbox_stream); -
branches/2.5/prototype/modules/mail/js/foldertree.js
r7783 r8016 466 466 /* Verifica se existe caracteres especiais no nome da pasta ou se existe "local_" 467 467 * em parte do nome (palavra reservada para pastas locais) */ 468 if($(this).val().match(/[\ /\`\~\^\<\>\|\\\"\!\@\#\$\%\&\*\+\(\)\[\]\{\}\?;:]/gi) || $(this).val().indexOf("local_") != -1){468 if($(this).val().match(/[\`\~\^\<\>\|\\\"\!\@\#\$\%\&\*\+\(\)\[\]\{\}\?;:]/gi) || $(this).val().indexOf("local_") != -1){ 469 469 return write_msg(get_lang("cannot create folder. try other folder name")); 470 470 }
Note: See TracChangeset
for help on using the changeset viewer.