Changeset 1340


Ignore:
Timestamp:
08/19/09 08:43:17 (15 years ago)
Author:
amuller
Message:

Ticket #605 - reverte modificação que criou problema na busca

Location:
trunk/expressoMail1_2
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/expressoMail1_2/inc/class.imap_functions.inc.php

    r1330 r1340  
    14241424                                $result[$i]['folder_name'] = array_pop($tmp_folder_parent); 
    14251425                                $result[$i]['folder_name'] = $result[$i]['folder_name'] == 'INBOX' ? 'Inbox' : $result[$i]['folder_name']; 
    1426                                 if ($_SESSION['phpgw_info']['user']['preferences']['expressoMail']['uid2cn']){ 
    1427                                         $this->ldap = new ldap_functions(); 
     1426                                if (is_numeric($result[$i]['folder_name']))     { 
     1427                                        //$this->ldap = new ldap_functions(); 
    14281428                                        if ($cn = $this->ldap->uid2cn($result[$i]['folder_name'])){ 
    14291429                                                $result[$i]['folder_name'] = $cn; 
     
    21532153        } 
    21542154        //Este bloco tem a finalidade de transformar o CPF das pastas compartilhadas em common name 
    2155         if ($_SESSION['phpgw_info']['user']['preferences']['expressoMail']['uid2cn']){ 
    2156                 if (substr($new_folder_name,0,4) == 'user'){ 
    2157                         $this->ldap = new ldap_functions(); 
    2158                         $tmp_folder_name = explode($this->imap_delimiter, $new_folder_name); 
    2159                                 $return['new_folder_name'] = array_pop($tmp_folder_name); 
     2155        if (substr($new_folder_name,0,4) == 'user'){ 
     2156                $this->ldap = new ldap_functions(); 
     2157                $tmp_folder_name = explode($this->imap_delimiter, $new_folder_name); 
     2158                        $return['new_folder_name'] = array_pop($tmp_folder_name); 
     2159                        if (is_numeric($return['new_folder_name'])) 
    21602160                                if( $cn = $this->ldap->uid2cn($return['new_folder_name'])) 
    21612161                                        $return['new_folder_name'] = $cn; 
    2162                 } 
    21632162        } 
    21642163                 
     
    29182917                                $filter = $this->remove_accents($filter); 
    29192918                                //Este bloco tem a finalidade de transformar o login (quando numerico) das pastas compartilhadas em common name 
    2920                                 if ($_SESSION['phpgw_info']['user']['preferences']['expressoMail']['uid2cn']){ 
    2921                                         $folder_name = explode($this->imap_delimiter,$name_box); 
     2919                                $folder_name = explode($this->imap_delimiter,$name_box); 
     2920                                if (is_numeric($folder_name[1])) { 
    29222921                                        $this->ldap = new ldap_functions(); 
    2923                                         if ($cn = $this->ldap->uid2cn($folder_name[1])){ 
     2922                                        if ($cn = $this->ldap->uid2cn($folder_name[1])) { 
    29242923                                                $folder_name[1] = $cn; 
    29252924                                        } 
    2926                                         $folder_name = implode($this->imap_delimiter,$folder_name); 
    2927                                 } 
    2928                                 else 
    2929                                         $folder_name = mb_convert_encoding(utf8_decode($name_box), "UTF7-IMAP", "ISO_8859-1" ); 
     2925                                } 
     2926                                $folder_name = implode($this->imap_delimiter,$folder_name); 
    29302927                                 
    29312928                                if(!is_resource($mbox_stream)) 
     
    29462943                                                { 
    29472944                                                        foreach($search_criteria as $new_search){ 
    2948                                                                 $m_token = trim("##". mb_convert_encoding( $folder_name, "ISO_8859-1", "UTF7-IMAP" ) . "--" . mb_convert_encoding( $name_box, "ISO_8859-1", "UTF7-IMAP" ) . "--" . $this->get_msg($new_search,$name_box,$mbox_stream) . "--".$new_search."##"."\n"); 
     2945                                                                $m_token = trim("##".mb_convert_encoding( $name_box, "ISO_8859-1", "UTF7-IMAP" ) . "--" . $this->get_msg($new_search,$name_box,$mbox_stream) . "--".$new_search."##"."\n"); 
    29492946                                                                if(!@strstr($retorno,$m_token)) 
    29502947                                                                        $retorno .= $m_token; 
     
    29602957                                        { 
    29612958                                                foreach($search_criteria as $new_search) 
    2962                                                         $retorno .= trim("##". mb_convert_encoding( $folder_name, "ISO_8859-1", "UTF7-IMAP" ) . "--" . mb_convert_encoding( $name_box, "ISO_8859-1", "UTF7-IMAP" ) . "--" . $this->get_msg($new_search,$name_box,$mbox_stream) . "--" . $new_search."##"."\n"); 
     2959                                                        $retorno .= trim("##".mb_convert_encoding( $name_box, "ISO_8859-1", "UTF7-IMAP" ) . "--" . $this->get_msg($new_search,$name_box,$mbox_stream) . "--" . $new_search."##"."\n"); 
    29632960                                        } 
    29642961                                } 
  • trunk/expressoMail1_2/inc/hook_settings.inc.php

    r1330 r1340  
    6464'</script>'); 
    6565//} 
    66  
    67 $default = false; 
    68 create_check_box('Do you want to show common name instead of UID?','uid2cn',$default, 
    69         'Do you want to show common name instead of UID?');  
    7066 
    7167$default = array( 
  • trunk/expressoMail1_2/js/local_messages.js

    r1330 r1340  
    569569                while(rs.isValidRow()) { 
    570570                        var header = connector.unserialize(rs.field(0)); 
    571                         retorno+="##"+"local_"+rs.field(1)+"--"+"local_"+rs.field(1)+"--"+header["from"]["name"]+"--"+header["subject"]+"--"+header["udate"]+"--"+this.aux_convert_size(rs.field(3))+"--"+header["Unseen"]+header["Recent"]+header["Flagged"]+header["Draft"]+"--"+rs.field(2)+"##"; 
     571                        retorno+="##"+"local_"+rs.field(1)+"--"+header["from"]["name"]+"--"+header["subject"]+"--"+header["udate"]+"--"+this.aux_convert_size(rs.field(3))+"--"+header["Unseen"]+header["Recent"]+header["Flagged"]+header["Draft"]+"--"+rs.field(2)+"##"; 
    572572                        rs.next(); 
    573573                } 
     
    701701    } 
    702702 
    703     local_messages.prototype.get_msg_date = function (original_id){ 
     703    local_messages.prototype.get_msg_date = function (original_id, is_local){ 
    704704 
    705705        this.init_local_messages(); 
    706706 
    707         var rs = this.dbGears.execute("select mail from mail where rowid="+original_id); 
    708         // rs = this.dbGears.execute("select mail from mail where original_id="+original_id); 
     707        if (typeof(is_local) == 'undefined') 
     708        { 
     709            is_local = false; 
     710        } 
     711 
     712        var rs; 
     713 
     714        if (is_local) 
     715        { 
     716            rs = this.dbGears.execute("select mail from mail where rowid="+original_id); 
     717        } 
     718        else 
     719        { 
     720            rs = this.dbGears.execute("select mail from mail where original_id="+original_id); 
     721        } 
    709722        var tmp = connector.unserialize(rs.field(0)); 
    710723        var ret = new Array(); 
  • trunk/expressoMail1_2/js/main.js

    r1330 r1340  
    14691469                        if(data.msg_day == '') 
    14701470                        { 
    1471                 header=expresso_local_messages.get_msg_date(data.original_ID); 
     1471                header=expresso_local_messages.get_msg_date(data.original_ID, proxy_mensagens.is_local_folder(get_current_folder())); 
    14721472 
    14731473                                data.fulldate=header.fulldate; 
  • trunk/expressoMail1_2/setup/phpgw_en.lang

    r1330 r1340  
    8080Do you want to block this e-mail?       expressoMail1_2 en      Do you want to block this e-mail? 
    8181Do you want to log the sent messages?   admin   en      Do you want to log the sent messages? 
    82 Do you want to show common name instead of UID? expressoMail1_2 en      Do you want to show common name instead of UID? 
    8382Do you want to use the spam filter?     admin   en      Do you want to use the spam filter? 
    8483Do you wish to exclude the folder       expressoMail1_2 en      Do you wish to exclude the folder  
Note: See TracChangeset for help on using the changeset viewer.