Changeset 4ffa559 in github


Ignore:
Timestamp:
Mar 3, 2012 8:20:14 AM (15 months ago)
Author:
alecpl <alec@…>
Branches:
release-0.7
Children:
b1fa85b7
Parents:
0411ae5
Message:
  • Apply fixes from trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • CHANGELOG

    r4dc22dd r4ffa559  
    22=========================== 
    33 
     4- Prevent from folder selection on virtual folder collapsing (#1488346) 
     5- Fix automatic unsubscribe of non-existent folders 
     6- Fix double-quotes handling in recipient names 
    47- User configurable setting how to display contact names in list 
    58- Make contacts list sorting configurable for the admin/user 
  • program/include/rcube_imap.php

    rd355c04 r4ffa559  
    30413041 
    30423042                // unsubscribe non-existent folders, remove from the list 
    3043                 if (is_array($a_folders) && $name == '*') { 
     3043                // we can do this only when LIST response is available 
     3044                if (is_array($a_folders) && $name == '*' && !empty($this->conn->data['LIST'])) { 
    30443045                    foreach ($a_folders as $idx => $folder) { 
    3045                         if ($this->conn->data['LIST'] && ($opts = $this->conn->data['LIST'][$folder]) 
     3046                        if (($opts = $this->conn->data['LIST'][$folder]) 
    30463047                            && in_array('\\NonExistent', $opts) 
    30473048                        ) { 
     
    30563057                $a_folders = $this->conn->listSubscribed($root, $name); 
    30573058 
    3058                 // unsubscribe non-existent folders, remove from the list 
    3059                 if (is_array($a_folders) && $name == '*') { 
     3059                // unsubscribe non-existent folders, remove them from the list, 
     3060                // we can do this only when LIST response is available 
     3061                if (is_array($a_folders) && $name == '*' && !empty($this->conn->data['LIST'])) { 
    30603062                    foreach ($a_folders as $idx => $folder) { 
    3061                         if ($this->conn->data['LIST'] && ($opts = $this->conn->data['LIST'][$folder]) 
    3062                             && in_array('\\Noselect', $opts) 
     3063                        if (!isset($this->conn->data['LIST'][$folder]) 
     3064                            || in_array('\\Noselect', $this->conn->data['LIST'][$folder]) 
    30633065                        ) { 
    30643066                            // Some servers returns \Noselect for existing folders 
  • program/include/rcube_imap_generic.php

    r82775db r4ffa559  
    22802280                    } 
    22812281 
    2282                     // Add to options array 
    2283                     if (empty($this->data['LIST'][$mailbox])) 
    2284                         $this->data['LIST'][$mailbox] = $opts; 
    2285                     else if (!empty($opts)) 
    2286                         $this->data['LIST'][$mailbox] = array_unique(array_merge( 
    2287                             $this->data['LIST'][$mailbox], $opts)); 
     2282                    // store LSUB options only if not empty, this way 
     2283                    // we can detect a situation when LIST doesn't return specified folder 
     2284                    if (!empty($opts) || $cmd == 'LIST') { 
     2285                        // Add to options array 
     2286                        if (empty($this->data['LIST'][$mailbox])) 
     2287                            $this->data['LIST'][$mailbox] = $opts; 
     2288                        else if (!empty($opts)) 
     2289                            $this->data['LIST'][$mailbox] = array_unique(array_merge( 
     2290                                $this->data['LIST'][$mailbox], $opts)); 
     2291                    } 
    22882292                } 
    22892293                // * STATUS <mailbox> (<result>) 
  • program/js/app.js

    r96c946e r4ffa559  
    14081408      this.env.collapsed_folders = this.env.collapsed_folders+'&'+urlencode(name)+'&'; 
    14091409 
    1410       // select parent folder if one of its childs is currently selected 
    1411       if (this.env.mailbox.indexOf(name + this.env.delimiter) == 0) 
     1410      // select the folder if one of its childs is currently selected 
     1411      // don't select if it's virtual (#1488346) 
     1412      if (this.env.mailbox.indexOf(name + this.env.delimiter) == 0 && !$(li).hasClass('virtual')) 
    14121413        this.command('list', name); 
    14131414    } 
  • program/steps/mail/sendmail.inc

    ree9ee7f r4ffa559  
    177177    } else if (preg_match('/<*'.$email_regexp.'>*$/', $item, $matches)) { 
    178178      $address = $matches[0]; 
    179       $name = trim(str_replace($address, '', $item), '" '); 
     179      $name = trim(str_replace($address, '', $item)); 
     180      if ($name[0] == '"' && $name[count($name)-1] == '"') { 
     181        $name = substr($name, 1, -1); 
     182      } 
     183      $name = stripcslashes($name); 
    180184      $address = rcube_idn_to_ascii(trim($address, '<>')); 
    181185      $result[] = format_email_recipient($address, $name); 
Note: See TracChangeset for help on using the changeset viewer.