diff options
author | Aleksander Machniak <alec@alec.pl> | 2014-04-10 08:41:34 +0200 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2014-04-10 08:41:34 +0200 |
commit | eddaf0b5f68c9863181b62db33bc468d38071e8a (patch) | |
tree | 16028e6f44573377ba901f097d64e97b1b79f6c2 /program/lib | |
parent | 70c0d256841aa736a3f4a74a345ec4b0dfcdad78 (diff) | |
parent | 39ca69b0072a618c0ccc112a016a44970c6667f7 (diff) |
Merge branch 'master' of github.com:roundcube/roundcubemail
Diffstat (limited to 'program/lib')
-rw-r--r-- | program/lib/Roundcube/html.php | 2 | ||||
-rw-r--r-- | program/lib/Roundcube/rcube_imap.php | 8 | ||||
-rw-r--r-- | program/lib/Roundcube/rcube_ldap.php | 13 | ||||
-rw-r--r-- | program/lib/Roundcube/rcube_message.php | 2 | ||||
-rw-r--r-- | program/lib/Roundcube/rcube_result_multifolder.php | 11 |
5 files changed, 26 insertions, 10 deletions
diff --git a/program/lib/Roundcube/html.php b/program/lib/Roundcube/html.php index 64324dd8e..f47ef299a 100644 --- a/program/lib/Roundcube/html.php +++ b/program/lib/Roundcube/html.php @@ -285,7 +285,7 @@ class html // ignore not allowed attributes if (!empty($allowed)) { - $is_data_attr = substr_compare($key, 'data-', 0, 5) === 0; + $is_data_attr = @substr_compare($key, 'data-', 0, 5) === 0; if (!isset($allowed_f[$key]) && (!$is_data_attr || !isset($allowed_f['data-*']))) { continue; } diff --git a/program/lib/Roundcube/rcube_imap.php b/program/lib/Roundcube/rcube_imap.php index 23cacd4d2..5c30327a1 100644 --- a/program/lib/Roundcube/rcube_imap.php +++ b/program/lib/Roundcube/rcube_imap.php @@ -988,6 +988,10 @@ class rcube_imap extends rcube_storage $a_msg_headers = array_slice(array_values($a_msg_headers), $from, $slice_length); } else { + if ($this->sort_order != $search_set->get_parameters('ORDER')) { + $search_set->revert(); + } + // slice resultset first... $fetch = array(); foreach (array_slice($search_set->get(), $from, $slice_length) as $msg_id) { @@ -1708,7 +1712,7 @@ class rcube_imap extends rcube_storage } // decode combined UID-folder identifier - if (preg_match('/^\d+-[^,]+$/', $uid)) { + if (preg_match('/^\d+-.+/', $uid)) { list($uid, $folder) = explode('-', $uid, 2); } @@ -1744,7 +1748,7 @@ class rcube_imap extends rcube_storage } // decode combined UID-folder identifier - if (preg_match('/^\d+-[^,]+$/', $uid)) { + if (preg_match('/^\d+-.+/', $uid)) { list($uid, $folder) = explode('-', $uid, 2); } diff --git a/program/lib/Roundcube/rcube_ldap.php b/program/lib/Roundcube/rcube_ldap.php index 55a64acec..5a4b9dd61 100644 --- a/program/lib/Roundcube/rcube_ldap.php +++ b/program/lib/Roundcube/rcube_ldap.php @@ -95,8 +95,8 @@ class rcube_ldap extends rcube_addressbook if (empty($this->prop['groups']['scope'])) $this->prop['groups']['scope'] = 'sub'; // extend group objectclass => member attribute mapping - if (!empty($this->prop['groups']['event-panel-summary'])) - $this->group_types = array_merge($this->group_types, $this->prop['groups']['event-panel-summary']); + if (!empty($this->prop['groups']['class_member_attr'])) + $this->group_types = array_merge($this->group_types, $this->prop['groups']['class_member_attr']); // add group name attrib to the list of attributes to be fetched $fetch_attributes[] = $this->prop['groups']['name_attr']; @@ -377,10 +377,11 @@ class rcube_ldap extends rcube_addressbook // replace placeholders in filter settings if (!empty($this->prop['filter'])) $this->prop['filter'] = strtr($this->prop['filter'], $replaces); - if (!empty($this->prop['groups']['filter'])) - $this->prop['groups']['filter'] = strtr($this->prop['groups']['filter'], $replaces); - if (!empty($this->prop['groups']['member_filter'])) - $this->prop['groups']['member_filter'] = strtr($this->prop['groups']['member_filter'], $replaces); + + foreach (array('base_dn','filter','member_filter') as $k) { + if (!empty($this->prop['groups'][$k])) + $this->prop['groups'][$k] = strtr($this->prop['groups'][$k], $replaces); + } if (!empty($this->prop['group_filters'])) { foreach ($this->prop['group_filters'] as $i => $gf) { diff --git a/program/lib/Roundcube/rcube_message.php b/program/lib/Roundcube/rcube_message.php index edfd339d8..a648ae722 100644 --- a/program/lib/Roundcube/rcube_message.php +++ b/program/lib/Roundcube/rcube_message.php @@ -75,7 +75,7 @@ class rcube_message function __construct($uid, $folder = null) { // decode combined UID-folder identifier - if (preg_match('/^\d+-[^,]+$/', $uid)) { + if (preg_match('/^\d+-.+/', $uid)) { list($uid, $folder) = explode('-', $uid, 2); } diff --git a/program/lib/Roundcube/rcube_result_multifolder.php b/program/lib/Roundcube/rcube_result_multifolder.php index 74a3d7805..b5473b841 100644 --- a/program/lib/Roundcube/rcube_result_multifolder.php +++ b/program/lib/Roundcube/rcube_result_multifolder.php @@ -130,6 +130,17 @@ class rcube_result_multifolder public function revert() { $this->order = $this->order == 'ASC' ? 'DESC' : 'ASC'; + $this->index = array(); + + // revert order in all sub-sets + foreach ($this->sets as $set) { + if ($this->order != $set->get_parameters('ORDER')) { + $set->revert(); + } + $folder = $set->get_parameters('MAILBOX'); + $index = array_map(function($uid) use ($folder) { return $uid . '-' . $folder; }, $set->get()); + $this->index = array_merge($this->index, $index); + } } |