- Timestamp:
- 09/21/12 10:11:56 (12 years ago)
- Location:
- sandbox/newExpressoMail
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/newExpressoMail/expressoMail1_2/inc/class.imap_functions.inc.php
r6952 r7266 2460 2460 $append['folder_id'] = $vv['id']; 2461 2461 $append['folder_name'] = (($uid2cn && isset($vv['user'])) && ($cn = $this->ldap->uid2cn($vv['user']))) ? $cn : $vv['name']; 2462 $status = imap_status($mboxStream, $vv['stream'], SA_ UNSEEN); //Resgata Numero de mensagens não lidas2462 $status = imap_status($mboxStream, $vv['stream'], SA_ALL); //Resgata Numero de mensagens não lidas 2463 2463 $append['folder_unseen'] = isset($status->unseen) ? $status->unseen : 0 ; 2464 $append['folder_total'] = isset($status->messages) ? $status->messages : 0 ; 2464 2465 $append['folder_hasChildren'] = (($vv['attributes'] == 32) && ($vv['name'] != 'INBOX')) ? 1 : 0; 2465 2466 $append['folder_parent'] = $vv['parent']; … … 2478 2479 } 2479 2480 2481 function getFolderInfo($folder){ 2482 $folder = ($folder != '' ? $folder : 'INBOX'); 2483 $return = array(); 2484 $append = array(); 2485 $newFolder = mb_convert_encoding($folder, 'UTF7-IMAP','UTF-8, ISO-8859-1, UTF7-IMAP'); 2486 $serverString = "{".$this->imap_server.":".$this->imap_port.$this->imap_options."}".$newFolder; 2487 $mboxStream = $this->open_mbox($folder); //abre conexão imap 2488 $status = imap_status($mboxStream, $serverString , SA_ALL); //Resgata Numero de mensagens não lidas 2489 $append['folder_id'] = $folder; 2490 $append['folder_name'] = explode($this->imap_delimiter,$folder); 2491 $append['folder_name'] = $append['folder_name'][count($append['folder_name'])-1]; 2492 $append['folder_unseen'] = isset($status->unseen) ? $status->unseen : 0 ; 2493 $append['folder_total'] = isset($status->messages) ? $status->messages : 0 ; 2494 $return[] = $append; 2495 return $return; 2496 } 2480 2497 2481 2498 function create_mailbox($arr) … … 2539 2556 function delete_mailbox($arr) 2540 2557 { 2541 $namebox = $arr['del_past'];2558 $namebox = isset($arr['del_past']) ? $arr['del_past'] : $arr; 2542 2559 $imap_server = $_SESSION['phpgw_info']['expressomail']['email_server']['imapServer']; 2543 2560 $mbox_stream = $this->mbox ? $this->mbox : $this->open_mbox(); -
sandbox/newExpressoMail/prototype/Sync.php
r6328 r7266 4 4 $accept = $_SERVER["HTTP_ACCEPT"]; 5 5 6 if(!function_exists('getRealREQUEST')) 7 { 8 function getRealREQUEST() { 9 $vars = array(); 10 11 if(isset($_SERVER['REDIRECT_QUERY_STRING'])) 12 $input = $_SERVER['REDIRECT_QUERY_STRING']; 13 14 if(!empty($input)){ 15 $pairs = explode("&", $input); 16 foreach ($pairs as $pair) { 17 $nv = explode("=", $pair); 18 19 $name = urldecode($nv[0]); 20 $nameSanitize = preg_replace('/([^\[]*)\[.*$/','$1',$name); 21 22 $nameMatched = str_replace('.','_',$nameSanitize); 23 $nameMatched = str_replace(' ','_',$nameMatched); 24 25 $vars[$nameSanitize] = $_REQUEST[$nameMatched]; 26 } 27 } 28 29 $input = file_get_contents("php://input"); 30 if(!empty($input)){ 31 $pairs = explode("&", $input); 32 foreach ($pairs as $pair) { 33 $nv = explode("=", $pair); 34 35 $name = urldecode($nv[0]); 36 $nameSanitize = preg_replace('/([^\[]*)\[.*$/','$1',$name); 37 38 $nameMatched = str_replace('.','_',$nameSanitize); 39 $nameMatched = str_replace(' ','_',$nameMatched); 40 41 $vars[$nameSanitize] = $_REQUEST[$nameMatched]; 42 } 43 } 44 45 return $vars; 46 } 47 } 48 6 49 if( !isset( $args ) ) 7 parse_str( file_get_contents('php://input'), $args);50 $args = getRealREQUEST(); 8 51 9 52 if(!function_exists('parseURI'))
Note: See TracChangeset
for help on using the changeset viewer.