Ignore:
Timestamp:
04/03/12 17:34:42 (12 years ago)
Author:
rafaelraymundo
Message:

Ticket #2589 - Compartilhar uma pasta com permissão de somente leitura.

File:
1 edited

Legend:

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

    r5621 r5873  
    18551855                        $i = 0; 
    18561856                        while (list($key, $val) = each($folders_list)) { 
    1857                                 $status = imap_status($mbox_stream, $val->name, SA_UNSEEN); 
    1858  
    1859                                 //$tmp_folder_id = explode("}", imap_utf7_decode($val->name)); 
    1860                                 $tmp_folder_id = explode("}", $val->name ); 
    1861  
    1862                                 $folderUser = trim( strpos( $tmp_folder_id[1], $this->imap_delimiter , 5 ) ); 
    1863  
    1864                             $folderUser = trim( substr( $tmp_folder_id[1], 0, $folderUser ) ); 
    1865  
    1866                             $Permission = true; 
    1867  
    1868                             if( $folderUser != "INBOX" && $folderUser != "" ) 
     1857                            $status = imap_status($mbox_stream, $val->name, SA_UNSEEN); 
     1858 
     1859                            //$tmp_folder_id = explode("}", imap_utf7_decode($val->name)); 
     1860                            $tmp_folder_id = explode("}", $val->name ); 
     1861 
     1862                            $tmp_folder_id[1] = mb_convert_encoding( $tmp_folder_id[1], "ISO-8859-1", "UTF7-IMAP" ); 
     1863 
     1864                            if( $tmp_folder_id[1]=='INBOX'.$this->imap_delimiter.'decifradas') 
    18691865                            { 
    1870                                $Permission = imap_getacl( $mbox_stream, $folderUser ); 
     1866                                    continue; 
    18711867                            } 
    1872  
    1873                             if( $Permission ) 
    1874                             { 
    1875                                 $tmp_folder_id[1] = mb_convert_encoding( $tmp_folder_id[1], "ISO-8859-1", "UTF7-IMAP" ); 
    1876  
    1877                                 if( $tmp_folder_id[1]=='INBOX'.$this->imap_delimiter.'decifradas') 
    1878                                 { 
    1879                                         continue; 
    1880                                 } 
    1881                                 $result[$i]['folder_unseen'] = $status->unseen; 
    1882                                 $folder_id = $tmp_folder_id[1]; 
    1883                                 $result[$i]['folder_id'] = $folder_id; 
    1884  
    1885                                 $tmp_folder_parent = explode($this->imap_delimiter, $folder_id); 
    1886                                 $result[$i]['folder_name'] = array_pop($tmp_folder_parent); 
    1887                                 $result[$i]['folder_name'] = $result[$i]['folder_name'] == 'INBOX' ? 'Inbox' : $result[$i]['folder_name']; 
    1888                          
    1889                                 if ($uid2cn && substr($folder_id,0,4) == 'user') { 
    1890                                         //$this->ldap = new ldap_functions(); 
    1891                                         if ($cn = $this->ldap->uid2cn($result[$i]['folder_name'])) { 
    1892                                                 $result[$i]['folder_name'] = $cn; 
    1893                                         } 
    1894                                 } 
    1895  
    1896                                 $tmp_folder_parent = implode($this->imap_delimiter, $tmp_folder_parent); 
    1897                                 $result[$i]['folder_parent'] = $tmp_folder_parent == 'INBOX' ? '' : $tmp_folder_parent; 
    1898  
    1899                                 if (($val->attributes == 32) && ($result[$i]['folder_name'] != 'Inbox')) 
    1900                                         $result[$i]['folder_hasChildren'] = 1; 
    1901                                 else 
    1902                                         $result[$i]['folder_hasChildren'] = 0; 
    1903  
    1904                                 switch ($tmp_folder_id[1]) { 
    1905                                         case $inbox: 
    1906                                         case $sent: 
    1907                                         case $drafts: 
    1908                                         case $spam: 
    1909                                         case $trash: 
    1910                                                 $resultDefault[]=$result[$i]; 
    1911                                                 break; 
    1912                                         default: 
    1913                                                 $resultMine[]=$result[$i]; 
    1914                                 } 
    1915  
     1868                            $result[$i]['folder_unseen'] = $status->unseen; 
     1869                            $folder_id = $tmp_folder_id[1]; 
     1870                            $result[$i]['folder_id'] = $folder_id; 
     1871 
     1872                            $tmp_folder_parent = explode($this->imap_delimiter, $folder_id); 
     1873                            $result[$i]['folder_name'] = array_pop($tmp_folder_parent); 
     1874                            $result[$i]['folder_name'] = $result[$i]['folder_name'] == 'INBOX' ? 'Inbox' : $result[$i]['folder_name']; 
     1875 
     1876                            if ($uid2cn && substr($folder_id,0,4) == 'user') { 
     1877                                    //$this->ldap = new ldap_functions(); 
     1878                                    if ($cn = $this->ldap->uid2cn($result[$i]['folder_name'])) { 
     1879                                            $result[$i]['folder_name'] = $cn; 
     1880                                    } 
     1881                            } 
     1882 
     1883                            $tmp_folder_parent = implode($this->imap_delimiter, $tmp_folder_parent); 
     1884                            $result[$i]['folder_parent'] = $tmp_folder_parent == 'INBOX' ? '' : $tmp_folder_parent; 
     1885 
     1886                            if (($val->attributes == 32) && ($result[$i]['folder_name'] != 'Inbox')) 
     1887                                    $result[$i]['folder_hasChildren'] = 1; 
     1888                            else 
     1889                                    $result[$i]['folder_hasChildren'] = 0; 
     1890 
     1891                            switch ($tmp_folder_id[1]) { 
     1892                                    case $inbox: 
     1893                                    case $sent: 
     1894                                    case $drafts: 
     1895                                    case $spam: 
     1896                                    case $trash: 
     1897                                            $resultDefault[]=$result[$i]; 
     1898                                            break; 
     1899                                    default: 
     1900                                            $resultMine[]=$result[$i]; 
    19161901                            } 
    19171902                            $i++; 
Note: See TracChangeset for help on using the changeset viewer.