Changeset 5488
- Timestamp:
- 02/09/12 15:58:57 (11 years ago)
- Location:
- trunk/expressoMail1_2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoMail1_2/inc/class.imap_functions.inc.php
r5482 r5488 92 92 return $this->mbox; 93 93 } 94 94 95 function move_folder($params){ 96 //preg_match( '/[a-zA-Z0-9]+$/',$params['folder_to_move'], $new_folder); 97 $old_folder = mb_convert_encoding($params['folder_to_move'], 'UTF7-IMAP','UTF-8, ISO-8859-1, UTF7-IMAP'); 98 $new_folder = explode($this->imap_delimiter, $old_folder ); 99 $to_folder = mb_convert_encoding($params['folder_to'], 'UTF7-IMAP','UTF-8, ISO-8859-1, UTF7-IMAP'); 100 $mbox = imap_open('{'.$this->imap_server.":".$this->imap_port.$this->imap_options.'}'.$new_folder[0], $this->username, $this->password); 101 imap_renamemailbox($mbox, '{'.$this->imap_server.":".$this->imap_port.$this->imap_options.'}'.$old_folder, '{'.$this->imap_server.":".$this->imap_port.$this->imap_options.'}'.$to_folder.$this->imap_delimiter.$new_folder[count($new_folder)-1]); 102 //imap_close($mbox); 103 return true; 104 } 105 95 106 function parse_error($error, $field = ''){ 96 107 // This error is returned from Imap. … … 332 343 if( $this->useCache === true ) 333 344 $this->cache->set( 'infoHead://'.$this->username.'://'.$this->mboxFolder.'://'.$msg_number , $return , $this->expirationCache); 334 345 335 346 return $return; 336 347 } … … 2338 2349 { 2339 2350 $namebox = $arr['newp']; 2351 $base_path = $arr['base_path']; 2340 2352 $mbox_stream = $this->open_mbox(); 2341 2353 $imap_server = $_SESSION['phpgw_info']['expressomail']['email_server']['imapServer']; 2342 $namebox = mb_convert_encoding($namebox, "UTF7-IMAP", "UTF-8"); 2343 2344 $result = "Ok"; 2345 if(!imap_createmailbox($mbox_stream,"{".$imap_server."}$namebox")) 2346 { 2347 $result = implode("<br />\n", imap_errors()); 2348 } 2349 2354 $test = explode("/", $namebox); 2355 if(count($test) < 1 || $base_path == null || $base_path == "" || $base_path == 'undefined'){ 2356 if($base_path != null || $base_path != "" || $base_path != 'undefined'){ 2357 $namebox = $base_path.$namebox; 2358 } 2359 $namebox = mb_convert_encoding($namebox, "UTF7-IMAP", "UTF-8"); 2360 $result = "Ok"; 2361 if(!imap_createmailbox($mbox_stream,"{".$imap_server."}".$namebox)) 2362 { 2363 $result = implode("<br />\n", imap_errors()); 2364 } 2365 }else{ 2366 $child = $base_path.$this->imap_delimiter; 2367 for($i =0; $i < count($test); $i++){ 2368 $child .= ($test[$i] ? $test[$i] : $this->functions->getLang("New Folder")); 2369 $namebox = mb_convert_encoding($child, "UTF7-IMAP", "UTF-8"); 2370 $result = "Ok"; 2371 if(!imap_createmailbox($mbox_stream,"{".$imap_server."}$namebox")) 2372 { 2373 $result = implode("<br />\n", imap_errors()); 2374 } 2375 $child .=$this->imap_delimiter; 2376 } 2377 } 2350 2378 if($mbox_stream) 2351 2379 imap_close($mbox_stream); 2352 2353 2380 return $result; 2354 2355 2381 } 2356 2382 … … 4411 4437 foreach($search_criteria as $new_search) 4412 4438 { 4413 4414 4439 $elem = $this->get_info_head_msg($new_search); 4440 $elem['udate'] = gmdate('d/m/Y', $elem['udate'] + $this->functions->CalculateDateOffset()); 4415 4441 $elem['boxname'] = mb_convert_encoding( $name_box, "ISO-8859-1", "UTF7-IMAP" ); 4416 4442 $elem['uid'] = $new_search; … … 4460 4486 $elem = $this->get_info_head_msg( $new_search ); 4461 4487 $elem['udate'] = gmdate('d/m/Y', $elem['udate'] + $this->functions->CalculateDateOffset()); 4462 4488 $elem['boxname'] = mb_convert_encoding( $name_box, "ISO-8859-1", "UTF7-IMAP" ); 4463 4489 $elem['uid'] = $new_search; 4464 4490 /* compare dates in ordering */ … … 4495 4521 $arrayRetorno['data'] = $pageret; 4496 4522 $arrayRetorno['currentTab'] = $params['current_tab']; 4497 4498 4523 return ($pageret) ? $arrayRetorno : 'none'; 4499 4524 } -
trunk/expressoMail1_2/setup/phpgw_pt-br.lang
r5473 r5488 270 270 It's not possible rename the folder: expressoMail1_2 pt-br Não é possível renomear a pasta: 271 271 It's not possible rename this folder, because it is being used in the moment! expressoMail1_2 pt-br Não é possível renomear esta pasta, pois está em uso no momento! 272 It's not possible move this folder, because it is being used in the moment! expressoMail1_2 pt-br Não é possível mover esta pasta, pois está em uso no momento! 273 Can not move this folder to this location, because the target has already a folder with this name expressoMail1_2 pt-br Impossivel mover esta pasta para este local,Pois o destino já tem uma pasta com este nome 274 It's not possible to move this folder to its subfolders! expressoMail1_2 pt-br Não é possível mover esta pasta para suas subpastas! 275 It's not possible move this folder, because its subfolder is being used in the moment! expressoMail1_2 pt-br Não é possível mover esta pasta, pois uma subpasta desta pasta está em uso no momento! 276 It's not possible rename this folder, because its subfolder is being used in the moment! expressoMail1_2 pt-br Não é possível editar esta pasta, pois uma subpasta desta pasta está em uso no momento! 272 277 It's not possible rename this folder! expressoMail1_2 pt-br Não é possível renomear esta pasta! 278 The folder was successfully moved expressoMail1_2 pt-br Pasta foi movida com sucesso 279 The folder was successfully rename expressoMail1_2 pt-br Pasta foi renomeada com sucesso 273 280 justifycenter expressoMail1_2 pt-br Centralizado 274 281 justifyfull expressoMail1_2 pt-br Justificar … … 758 765 Include digital signature expressoMail1_2 pt-br Incluir assinatura digital 759 766 cannot create folder with more than 100 characters expressoMail1_2 pt-br Uma pasta deve ter no máximo 100 caracteres 767 Do you want to cancel the folder creation? expressoMail1_2 pt-br Deseja cancelar a criação da pasta? 768 Do you want to cancel the folder edition? expressoMail1_2 pt-br Deseja cancelar a edição da pasta? 769 One or more messages from this folder are open expressoMail1_2 pt-br Uma ou mais mensagens desta pasta estão abertas 770 One or more messages from any sub-folder are open expressoMail1_2 pt-br Uma ou mais mensagens de alguma sub-pasta desta pasta estão abertas 771 Thie folder is already in this place expressoMail1_2 pt-br A pasta já esta neste local 772 Delete/move subfolders first expressoMail1_2 pt-br Delete/mova suas subpastas primeiro
Note: See TracChangeset
for help on using the changeset viewer.