diff options
author | alecpl <alec@alec.pl> | 2011-12-02 09:58:03 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2011-12-02 09:58:03 +0000 |
commit | e237eec8468e99b65a9160a0a3f07529b92725e3 (patch) | |
tree | 7dc3356870ba062c595c2901ed1aac1e0d483252 /program/include | |
parent | a691021389779487e93370ad4c4120cd0ee516b7 (diff) |
- Applied fixes from trunk up to r5526
Diffstat (limited to 'program/include')
-rw-r--r-- | program/include/rcmail.php | 4 | ||||
-rw-r--r-- | program/include/rcube_imap.php | 2 | ||||
-rw-r--r-- | program/include/rcube_ldap.php | 24 | ||||
-rw-r--r-- | program/include/rcube_session.php | 13 |
4 files changed, 12 insertions, 31 deletions
diff --git a/program/include/rcmail.php b/program/include/rcmail.php index e06594fcd..6f0ba2ce9 100644 --- a/program/include/rcmail.php +++ b/program/include/rcmail.php @@ -453,8 +453,7 @@ class rcmail } // add to the 'books' array for shutdown function - if (!isset($this->address_books[$id])) - $this->address_books[$id] = $contacts; + $this->address_books[$id] = $contacts; return $contacts; } @@ -1228,7 +1227,6 @@ class rcmail // before closing the database connection, write session data if ($_SERVER['REMOTE_ADDR'] && is_object($this->session)) { - $this->session->cleanup(); session_write_close(); } diff --git a/program/include/rcube_imap.php b/program/include/rcube_imap.php index a0a5f8189..1c5dd2e3f 100644 --- a/program/include/rcube_imap.php +++ b/program/include/rcube_imap.php @@ -4162,7 +4162,7 @@ class rcube_imap $input = preg_replace("/\?=\s+=\?/", '?==?', $input); // encoded-word regexp - $re = '/=\?([^?]+)\?([BbQq])\?([^?\n]*)\?=/'; + $re = '/=\?([^?]+)\?([BbQq])\?([^\n]*?)\?=/'; // Find all RFC2047's encoded words if (preg_match_all($re, $input, $matches, PREG_OFFSET_CAPTURE | PREG_SET_ORDER)) { diff --git a/program/include/rcube_ldap.php b/program/include/rcube_ldap.php index 03347512c..3ec0e5f3b 100644 --- a/program/include/rcube_ldap.php +++ b/program/include/rcube_ldap.php @@ -655,14 +655,11 @@ class rcube_ldap extends rcube_addressbook $attrib = $count ? array('dn') : array_values($this->fieldmap); if ($result = @$func($this->conn, $m[1], $filter, - $attrib, 0, (int)$this->prop['sizelimit'], (int)$this->prop['timelimit'])) - { + $attrib, 0, (int)$this->prop['sizelimit'], (int)$this->prop['timelimit']) + ) { $this->_debug("S: ".ldap_count_entries($this->conn, $result)." record(s) for ".$m[1]); - if ($err = ldap_errno($this->conn)) - $this->_debug("S: Error: " .ldap_err2str($err)); } - else - { + else { $this->_debug("S: ".ldap_error($this->conn)); return $group_members; } @@ -1227,15 +1224,14 @@ class rcube_ldap extends rcube_addressbook // only fetch dn for count (should keep the payload low) $attrs = $count ? array('dn') : array_values($this->fieldmap); if ($this->ldap_result = @$function($this->conn, $this->base_dn, $filter, - $attrs, 0, (int)$this->prop['sizelimit'], (int)$this->prop['timelimit'])) - { - $this->_debug("S: ".ldap_count_entries($this->conn, $this->ldap_result)." record(s)"); - if ($err = ldap_errno($this->conn)) - $this->_debug("S: Error: " .ldap_err2str($err)); - return $count ? ldap_count_entries($this->conn, $this->ldap_result) : true; + $attrs, 0, (int)$this->prop['sizelimit'], (int)$this->prop['timelimit']) + ) { + $entries_count = ldap_count_entries($this->conn, $this->ldap_result); + $this->_debug("S: $count_entries record(s)"); + + return $count ? $count_entries : true; } - else - { + else { $this->_debug("S: ".ldap_error($this->conn)); } } diff --git a/program/include/rcube_session.php b/program/include/rcube_session.php index 582b27efa..bd0ce60e4 100644 --- a/program/include/rcube_session.php +++ b/program/include/rcube_session.php @@ -336,19 +336,6 @@ class rcube_session /** - * Cleanup session data before saving - */ - public function cleanup() - { - // current compose information is stored in $_SESSION['compose'], move it to $_SESSION['compose_data_<ID>'] - if ($compose_id = $_SESSION['compose']['id']) { - $_SESSION['compose_data_'.$compose_id] = $_SESSION['compose']; - $this->remove('compose'); - } - } - - - /** * Register additional garbage collector functions * * @param mixed Callback function |