Changeset 4593 for branches/2.2


Ignore:
Timestamp:
06/10/11 15:59:19 (13 years ago)
Author:
niltonneto
Message:

Ticket #2007 - Corrigido rotina que automatiza criação das pastas faltantes no IMAP.

Location:
branches/2.2/expressoMail1_2
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2/expressoMail1_2/inc/class.imap_functions.inc.php

    r4587 r4593  
    19491949                foreach($nameboxs as $key=>$tmp){ 
    19501950                        if($tmp != ""){ 
    1951                                 if(!imap_createmailbox($mbox_stream,imap_utf7_encode("{".$imap_server."}$tmp"))){ 
    1952                                         $result = implode("<br />\n", imap_errors()); 
    1953                                         if($mbox_stream) 
    1954                                                 imap_close($mbox_stream); 
    1955                                         return $result; 
     1951                                $to_create_array = explode($this->imap_delimiter, $tmp); 
     1952                                array_pop(&$to_create_array); 
     1953                                $folder = array(); 
     1954                                foreach($to_create_array as $k=>$to_create){ 
     1955                                        $folder[] = $to_create; 
     1956                                        if($to_create != 'INBOX') { 
     1957                                                $tmp = implode($this->imap_delimiter, $folder); 
     1958                                                if(!imap_createmailbox($mbox_stream,imap_utf7_encode("{".$imap_server."}$tmp"))){ 
     1959                                                        $result = implode("<br />\n", imap_errors()); 
     1960                                                        if("Mailbox already exists" != $result) { 
     1961                                                                imap_close($mbox_stream); 
     1962                                                                return $result; 
     1963                                                        } 
     1964                                                } 
     1965                                        } 
    19561966                                } 
    19571967                        } 
  • branches/2.2/expressoMail1_2/js/draw_api.js

    r4448 r4593  
    343343                var nm1 = ""; 
    344344                if(tree_folders._folderPr.length > 0){ 
    345                         var nm_folder = ""; 
    346                         for(var i=0; i < tree_folders._folderPr.length; i++){ 
    347                                 nm_folder = tree_folders._folderPr[i].split(cyrus_delimiter); 
    348                                 if(nm_folder[0] == "INBOX"){ 
    349                                         if(nm1 == ""){ 
    350                                                 nm1 = nm_folder[1]; 
    351                                                 folder_create = "INBOX" + cyrus_delimiter + nm_folder[1] + ";"; 
    352                                         }else{ 
    353                                                 if( nm1 != nm_folder[1]){ 
    354                                                         folder_create += "INBOX" + cyrus_delimiter + nm_folder[1] + ";"; 
    355                                                         nm1 = nm_folder[1]; 
    356                                                 } 
     345                        folder_create = tree_folders._folderPr.join(';'); 
     346                } 
     347                if(folder_create != ""){ 
     348                        if(confirm(get_lang("There are folders with invalid format. If you want to fix now, click on button OK."))){ 
     349                                var handler_correct_folders = function(data){ 
     350                                        //Timeout to release HTTPRequest , loadScript and update tree folders. 
     351                                        if(data){ 
     352                                                write_msg(get_lang('The folders were fixed with success.')); 
     353                                                setTimeout("connector.loadScript('TreeShow');ttreeBox.update_folder();",500); 
    357354                                        } 
    358355                                } 
    359                         } 
    360                 } 
    361                 if(folder_create != ""){ 
    362                         if(confirm(get_lang("There are folders with invalid format. Do you want to fix them?"))){ 
    363                                 var handler_correct_folders = function(data){ 
    364                                         //Timeout to release HTTPRequest , loadScript and update tree folders. 
    365                                         if(data) 
    366                                                 setTimeout("connector.loadScript('TreeShow');ttreeBox.update_folder();",500); 
    367                                 } 
    368356                                cExecute("$this.imap_functions.create_extra_mailbox",handler_correct_folders,"nw_folders="+folder_create); 
     357                        } 
     358                        else{ 
     359                                write_msg(get_lang('Warning: The folders with invalid format will be unavailable.')); 
    369360                        } 
    370361                } 
  • branches/2.2/expressoMail1_2/setup/phpgw_pt-br.lang

    r4511 r4593  
    506506The field \"%1\" of the message it contains     expressoMail1_2 pt-br   O campo \"%1\" da mensagem contém 
    507507The folder %1 was successfully removed  expressoMail1_2 pt-br   A pasta %1 foi removida com sucesso! 
     508The folders were fixed with success.    expressoMail1_2 pt-br   As pastas foram corrigidas com sucesso. 
    508509The folder was not deleted!     expressoMail1_2 es-es   A pasta não foi removida! 
    509510The import was executed successfully.   expressoMail1_2 pt-br   A importação foi executada com sucesso. 
     
    526527The size of this message has exceeded  the limit (%1B). expressoMail1_2 pt-br   O tamanho desta mensagem excedeu o limite (maior que %1B). 
    527528The Timezone you're in. expressoMail1_2 pt-br   O fuso-horário em que você está. 
     529There are folders with invalid format. If you want to fix now, click on button OK.      expressoMail1_2 pt-br   Algumas pastas possuem formato inválido.\n Para corrigi-las agora clique no botão 'OK'.  
    528530This is the number of messages shown in your mailbox per page   expressoMail1_2 pt-br   Este é o número de mensagens mostradas na sua caixa de correio por página 
    529531This list has no participants   expressoMail1_2 pt-br   Esta lista nao possui nenhum participante. 
     
    570572Voided message  expressoMail1_2 pt-br   Mensagem violada 
    571573Warning: Your Mailbox is almost full!   expressoMail1_2 pt-br   Aviso: Sua caixa postal está quase cheia! 
     574Warning: The folders with invalid format will be unavailable.   expressoMail1_2 pt-br   Aviso: As pastas com formato inválido estarão indisponíveis. 
    572575was succefully removed  expressoMail1_2 pt-br    foi removida com sucesso 
    573576Wednesday       expressoMail1_2 pt-br   Quarta-feira 
Note: See TracChangeset for help on using the changeset viewer.