|
|
@ -40,8 +40,19 @@ class rcube_imap
|
|
|
|
public $delimiter = NULL;
|
|
|
|
public $delimiter = NULL;
|
|
|
|
public $threading = false;
|
|
|
|
public $threading = false;
|
|
|
|
public $fetch_add_headers = '';
|
|
|
|
public $fetch_add_headers = '';
|
|
|
|
public $conn; // rcube_imap_generic object
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* Instance of rcube_imap_generic
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @var rcube_imap_generic
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
public $conn;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* Instance of rcube_mdb2
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @var rcube_mdb2
|
|
|
|
|
|
|
|
*/
|
|
|
|
private $db;
|
|
|
|
private $db;
|
|
|
|
private $root_ns = '';
|
|
|
|
private $root_ns = '';
|
|
|
|
private $mailbox = 'INBOX';
|
|
|
|
private $mailbox = 'INBOX';
|
|
|
@ -83,11 +94,11 @@ class rcube_imap
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Connect to an IMAP server
|
|
|
|
* Connect to an IMAP server
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param string Host to connect
|
|
|
|
* @param string $host Host to connect
|
|
|
|
* @param string Username for IMAP account
|
|
|
|
* @param string $user Username for IMAP account
|
|
|
|
* @param string Password for IMAP account
|
|
|
|
* @param string $pass Password for IMAP account
|
|
|
|
* @param number Port to connect to
|
|
|
|
* @param integer $port Port to connect to
|
|
|
|
* @param string SSL schema (either ssl or tls) or null if plain connection
|
|
|
|
* @param string $use_ssl SSL schema (either ssl or tls) or null if plain connection
|
|
|
|
* @return boolean TRUE on success, FALSE on failure
|
|
|
|
* @return boolean TRUE on success, FALSE on failure
|
|
|
|
* @access public
|
|
|
|
* @access public
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -180,6 +191,8 @@ class rcube_imap
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Set options to be used in rcube_imap_generic::connect()
|
|
|
|
* Set options to be used in rcube_imap_generic::connect()
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @param array $opt Options array
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
function set_options($opt)
|
|
|
|
function set_options($opt)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -192,7 +205,7 @@ class rcube_imap
|
|
|
|
* Only folders within this root folder will be displayed
|
|
|
|
* Only folders within this root folder will be displayed
|
|
|
|
* and all folder paths will be translated using this folder name
|
|
|
|
* and all folder paths will be translated using this folder name
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param string Root folder
|
|
|
|
* @param string $root Root folder
|
|
|
|
* @access public
|
|
|
|
* @access public
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
function set_rootdir($root)
|
|
|
|
function set_rootdir($root)
|
|
|
@ -213,7 +226,7 @@ class rcube_imap
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* This will be used for message decoding if a charset specification is not available
|
|
|
|
* This will be used for message decoding if a charset specification is not available
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param string Charset string
|
|
|
|
* @param string $cs Charset string
|
|
|
|
* @access public
|
|
|
|
* @access public
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
function set_charset($cs)
|
|
|
|
function set_charset($cs)
|
|
|
@ -225,7 +238,7 @@ class rcube_imap
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* This list of folders will be listed above all other folders
|
|
|
|
* This list of folders will be listed above all other folders
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param array Indexed list of folder names
|
|
|
|
* @param array $arr Indexed list of folder names
|
|
|
|
* @access public
|
|
|
|
* @access public
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
function set_default_mailboxes($arr)
|
|
|
|
function set_default_mailboxes($arr)
|
|
|
@ -245,7 +258,7 @@ class rcube_imap
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* All operations will be perfomed on this mailbox/folder
|
|
|
|
* All operations will be perfomed on this mailbox/folder
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param string Mailbox/Folder name
|
|
|
|
* @param string $new_mbox Mailbox/Folder name
|
|
|
|
* @access public
|
|
|
|
* @access public
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
function set_mailbox($new_mbox)
|
|
|
|
function set_mailbox($new_mbox)
|
|
|
@ -265,7 +278,7 @@ class rcube_imap
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Set internal list page
|
|
|
|
* Set internal list page
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param number Page number to list
|
|
|
|
* @param number $page Page number to list
|
|
|
|
* @access public
|
|
|
|
* @access public
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
function set_page($page)
|
|
|
|
function set_page($page)
|
|
|
@ -277,7 +290,7 @@ class rcube_imap
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Set internal page size
|
|
|
|
* Set internal page size
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param number Number of messages to display on one page
|
|
|
|
* @param number $size Number of messages to display on one page
|
|
|
|
* @access public
|
|
|
|
* @access public
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
function set_pagesize($size)
|
|
|
|
function set_pagesize($size)
|
|
|
@ -344,7 +357,7 @@ class rcube_imap
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Returns the IMAP server's capability
|
|
|
|
* Returns the IMAP server's capability
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param string Capability name
|
|
|
|
* @param string $cap Capability name
|
|
|
|
* @return mixed Capability value or TRUE if supported, FALSE if not
|
|
|
|
* @return mixed Capability value or TRUE if supported, FALSE if not
|
|
|
|
* @access public
|
|
|
|
* @access public
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -357,7 +370,7 @@ class rcube_imap
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Sets threading flag to the best supported THREAD algorithm
|
|
|
|
* Sets threading flag to the best supported THREAD algorithm
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param boolean TRUE to enable and FALSE
|
|
|
|
* @param boolean $enable TRUE to enable and FALSE
|
|
|
|
* @return string Algorithm or false if THREAD is not supported
|
|
|
|
* @return string Algorithm or false if THREAD is not supported
|
|
|
|
* @access public
|
|
|
|
* @access public
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -382,7 +395,7 @@ class rcube_imap
|
|
|
|
* Checks the PERMANENTFLAGS capability of the current mailbox
|
|
|
|
* Checks the PERMANENTFLAGS capability of the current mailbox
|
|
|
|
* and returns true if the given flag is supported by the IMAP server
|
|
|
|
* and returns true if the given flag is supported by the IMAP server
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param string Permanentflag name
|
|
|
|
* @param string $flag Permanentflag name
|
|
|
|
* @return mixed True if this flag is supported
|
|
|
|
* @return mixed True if this flag is supported
|
|
|
|
* @access public
|
|
|
|
* @access public
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -415,11 +428,11 @@ class rcube_imap
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Get message count for a specific mailbox
|
|
|
|
* Get message count for a specific mailbox
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param string Mailbox/folder name
|
|
|
|
* @param string $mbox_name Mailbox/folder name
|
|
|
|
* @param string Mode for count [ALL|THREADS|UNSEEN|RECENT]
|
|
|
|
* @param string $mode Mode for count [ALL|THREADS|UNSEEN|RECENT]
|
|
|
|
* @param boolean Force reading from server and update cache
|
|
|
|
* @param boolean $force Force reading from server and update cache
|
|
|
|
* @param boolean Enables storing folder status info (max UID/count),
|
|
|
|
* @param boolean $status Enables storing folder status info (max UID/count),
|
|
|
|
* required for mailbox_status()
|
|
|
|
* required for mailbox_status()
|
|
|
|
* @return int Number of messages
|
|
|
|
* @return int Number of messages
|
|
|
|
* @access public
|
|
|
|
* @access public
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -433,6 +446,12 @@ class rcube_imap
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Private method for getting nr of messages
|
|
|
|
* Private method for getting nr of messages
|
|
|
|
*
|
|
|
|
*
|
|
|
|
|
|
|
|
* @param string $mailbox Mailbox name
|
|
|
|
|
|
|
|
* @param string $mode Mode for count [ALL|THREADS|UNSEEN|RECENT]
|
|
|
|
|
|
|
|
* @param boolean $force Force reading from server and update cache
|
|
|
|
|
|
|
|
* @param boolean $status Enables storing folder status info (max UID/count),
|
|
|
|
|
|
|
|
* required for mailbox_status()
|
|
|
|
|
|
|
|
* @return int Number of messages
|
|
|
|
* @access private
|
|
|
|
* @access private
|
|
|
|
* @see rcube_imap::messagecount()
|
|
|
|
* @see rcube_imap::messagecount()
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -513,6 +532,8 @@ class rcube_imap
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Private method for getting nr of threads
|
|
|
|
* Private method for getting nr of threads
|
|
|
|
*
|
|
|
|
*
|
|
|
|
|
|
|
|
* @param string $mailbox
|
|
|
|
|
|
|
|
* @param int $msg_count
|
|
|
|
* @access private
|
|
|
|
* @access private
|
|
|
|
* @see rcube_imap::messagecount()
|
|
|
|
* @see rcube_imap::messagecount()
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -534,11 +555,11 @@ class rcube_imap
|
|
|
|
* Public method for listing headers
|
|
|
|
* Public method for listing headers
|
|
|
|
* convert mailbox name with root dir first
|
|
|
|
* convert mailbox name with root dir first
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param string Mailbox/folder name
|
|
|
|
* @param string $mbox_name Mailbox/folder name
|
|
|
|
* @param int Current page to list
|
|
|
|
* @param int $page Current page to list
|
|
|
|
* @param string Header field to sort by
|
|
|
|
* @param string $sort_field Header field to sort by
|
|
|
|
* @param string Sort order [ASC|DESC]
|
|
|
|
* @param string $sort_order Sort order [ASC|DESC]
|
|
|
|
* @param boolean Number of slice items to extract from result array
|
|
|
|
* @param int $slice Number of slice items to extract from result array
|
|
|
|
* @return array Indexed array with message header objects
|
|
|
|
* @return array Indexed array with message header objects
|
|
|
|
* @access public
|
|
|
|
* @access public
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -552,6 +573,12 @@ class rcube_imap
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Private method for listing message headers
|
|
|
|
* Private method for listing message headers
|
|
|
|
*
|
|
|
|
*
|
|
|
|
|
|
|
|
* @param string $mailbox Mailbox name
|
|
|
|
|
|
|
|
* @param int $page Current page to list
|
|
|
|
|
|
|
|
* @param string $sort_field Header field to sort by
|
|
|
|
|
|
|
|
* @param string $sort_order Sort order [ASC|DESC]
|
|
|
|
|
|
|
|
* @param int $slice Number of slice items to extract from result array
|
|
|
|
|
|
|
|
* @return array Indexed array with message header objects
|
|
|
|
* @access private
|
|
|
|
* @access private
|
|
|
|
* @see rcube_imap::list_headers
|
|
|
|
* @see rcube_imap::list_headers
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -676,6 +703,13 @@ class rcube_imap
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Private method for listing message headers using threads
|
|
|
|
* Private method for listing message headers using threads
|
|
|
|
*
|
|
|
|
*
|
|
|
|
|
|
|
|
* @param string $mailbox Mailbox/folder name
|
|
|
|
|
|
|
|
* @param int $page Current page to list
|
|
|
|
|
|
|
|
* @param string $sort_field Header field to sort by
|
|
|
|
|
|
|
|
* @param string $sort_order Sort order [ASC|DESC]
|
|
|
|
|
|
|
|
* @param boolean $recursive
|
|
|
|
|
|
|
|
* @param int $slice Number of slice items to extract from result array
|
|
|
|
|
|
|
|
* @return array Indexed array with message header objects
|
|
|
|
* @access private
|
|
|
|
* @access private
|
|
|
|
* @see rcube_imap::list_headers
|
|
|
|
* @see rcube_imap::list_headers
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -703,7 +737,7 @@ class rcube_imap
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Private method for fetching threads data
|
|
|
|
* Private method for fetching threads data
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param string Mailbox/folder name
|
|
|
|
* @param string $mailbox Mailbox/folder name
|
|
|
|
* @return array Array with thread data
|
|
|
|
* @return array Array with thread data
|
|
|
|
* @access private
|
|
|
|
* @access private
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -732,6 +766,13 @@ class rcube_imap
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Private method for fetching threaded messages headers
|
|
|
|
* Private method for fetching threaded messages headers
|
|
|
|
*
|
|
|
|
*
|
|
|
|
|
|
|
|
* @param string $mailbox Mailbox name
|
|
|
|
|
|
|
|
* @param string $thread_tree
|
|
|
|
|
|
|
|
* @param int $msg_depth
|
|
|
|
|
|
|
|
* @param boolean $has_children
|
|
|
|
|
|
|
|
* @param int $msg_index
|
|
|
|
|
|
|
|
* @param int $page
|
|
|
|
|
|
|
|
* @param int $slice
|
|
|
|
* @access private
|
|
|
|
* @access private
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
private function _fetch_thread_headers($mailbox, $thread_tree, $msg_depth, $has_children, $msg_index, $page, $slice=0)
|
|
|
|
private function _fetch_thread_headers($mailbox, $thread_tree, $msg_depth, $has_children, $msg_index, $page, $slice=0)
|
|
|
@ -779,9 +820,9 @@ class rcube_imap
|
|
|
|
* Private method for setting threaded messages flags:
|
|
|
|
* Private method for setting threaded messages flags:
|
|
|
|
* depth, has_children and unread_children
|
|
|
|
* depth, has_children and unread_children
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param array Reference to headers array indexed by message ID
|
|
|
|
* @param array $headers Reference to headers array indexed by message ID
|
|
|
|
* @param array Array of messages depth indexed by message ID
|
|
|
|
* @param array $msg_depth Array of messages depth indexed by message ID
|
|
|
|
* @param array Array of messages children flags indexed by message ID
|
|
|
|
* @param array $msg_children Array of messages children flags indexed by message ID
|
|
|
|
* @return array Message headers array indexed by message ID
|
|
|
|
* @return array Message headers array indexed by message ID
|
|
|
|
* @access private
|
|
|
|
* @access private
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -810,11 +851,11 @@ class rcube_imap
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Private method for listing a set of message headers (search results)
|
|
|
|
* Private method for listing a set of message headers (search results)
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param string Mailbox/folder name
|
|
|
|
* @param string $mailbox Mailbox/folder name
|
|
|
|
* @param int Current page to list
|
|
|
|
* @param int $page Current page to list
|
|
|
|
* @param string Header field to sort by
|
|
|
|
* @param string $sort_field Header field to sort by
|
|
|
|
* @param string Sort order [ASC|DESC]
|
|
|
|
* @param string $sort_order Sort order [ASC|DESC]
|
|
|
|
* @param boolean Number of slice items to extract from result array
|
|
|
|
* @param int $slice Number of slice items to extract from result array
|
|
|
|
* @return array Indexed array with message header objects
|
|
|
|
* @return array Indexed array with message header objects
|
|
|
|
* @access private
|
|
|
|
* @access private
|
|
|
|
* @see rcube_imap::list_header_set()
|
|
|
|
* @see rcube_imap::list_header_set()
|
|
|
@ -943,11 +984,11 @@ class rcube_imap
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Private method for listing a set of threaded message headers (search results)
|
|
|
|
* Private method for listing a set of threaded message headers (search results)
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param string Mailbox/folder name
|
|
|
|
* @param string $mailbox Mailbox/folder name
|
|
|
|
* @param int Current page to list
|
|
|
|
* @param int $page Current page to list
|
|
|
|
* @param string Header field to sort by
|
|
|
|
* @param string $sort_field Header field to sort by
|
|
|
|
* @param string Sort order [ASC|DESC]
|
|
|
|
* @param string $sort_order Sort order [ASC|DESC]
|
|
|
|
* @param boolean Number of slice items to extract from result array
|
|
|
|
* @param int $slice Number of slice items to extract from result array
|
|
|
|
* @return array Indexed array with message header objects
|
|
|
|
* @return array Indexed array with message header objects
|
|
|
|
* @access private
|
|
|
|
* @access private
|
|
|
|
* @see rcube_imap::list_header_set()
|
|
|
|
* @see rcube_imap::list_header_set()
|
|
|
@ -985,8 +1026,8 @@ class rcube_imap
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Helper function to get first and last index of the requested set
|
|
|
|
* Helper function to get first and last index of the requested set
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param int message count
|
|
|
|
* @param int $max message count
|
|
|
|
* @param mixed page number to show, or string 'all'
|
|
|
|
* @param mixed $page page number to show, or string 'all'
|
|
|
|
* @return array array with two values: first index, last index
|
|
|
|
* @return array array with two values: first index, last index
|
|
|
|
* @access private
|
|
|
|
* @access private
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -1084,7 +1125,7 @@ class rcube_imap
|
|
|
|
* We compare the maximum UID to determine the number of
|
|
|
|
* We compare the maximum UID to determine the number of
|
|
|
|
* new messages because the RECENT flag is not reliable.
|
|
|
|
* new messages because the RECENT flag is not reliable.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param string Mailbox/folder name
|
|
|
|
* @param string $mbox_name Mailbox/folder name
|
|
|
|
* @return int Folder status
|
|
|
|
* @return int Folder status
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
function mailbox_status($mbox_name = null)
|
|
|
|
function mailbox_status($mbox_name = null)
|
|
|
@ -1116,9 +1157,9 @@ class rcube_imap
|
|
|
|
* Stores folder statistic data in session
|
|
|
|
* Stores folder statistic data in session
|
|
|
|
* @TODO: move to separate DB table (cache?)
|
|
|
|
* @TODO: move to separate DB table (cache?)
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param string Mailbox name
|
|
|
|
* @param string $mbox_name Mailbox name
|
|
|
|
* @param string Data name
|
|
|
|
* @param string $name Data name
|
|
|
|
* @param mixed Data value
|
|
|
|
* @param mixed $data Data value
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
private function set_folder_stats($mbox_name, $name, $data)
|
|
|
|
private function set_folder_stats($mbox_name, $name, $data)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -1129,7 +1170,7 @@ class rcube_imap
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Gets folder statistic data
|
|
|
|
* Gets folder statistic data
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param string Mailbox name
|
|
|
|
* @param string $mbox_name Mailbox name
|
|
|
|
* @return array Stats data
|
|
|
|
* @return array Stats data
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
private function get_folder_stats($mbox_name)
|
|
|
|
private function get_folder_stats($mbox_name)
|
|
|
@ -1144,9 +1185,9 @@ class rcube_imap
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Return sorted array of message IDs (not UIDs)
|
|
|
|
* Return sorted array of message IDs (not UIDs)
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param string Mailbox to get index from
|
|
|
|
* @param string $mbox_name Mailbox to get index from
|
|
|
|
* @param string Sort column
|
|
|
|
* @param string $sort_field Sort column
|
|
|
|
* @param string Sort order [ASC, DESC]
|
|
|
|
* @param string $sort_order Sort order [ASC, DESC]
|
|
|
|
* @return array Indexed array with message ids
|
|
|
|
* @return array Indexed array with message ids
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
function message_index($mbox_name='', $sort_field=NULL, $sort_order=NULL)
|
|
|
|
function message_index($mbox_name='', $sort_field=NULL, $sort_order=NULL)
|
|
|
@ -1257,9 +1298,9 @@ class rcube_imap
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Return sorted array of threaded message IDs (not UIDs)
|
|
|
|
* Return sorted array of threaded message IDs (not UIDs)
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param string Mailbox to get index from
|
|
|
|
* @param string $mbox_name Mailbox to get index from
|
|
|
|
* @param string Sort column
|
|
|
|
* @param string $sort_field Sort column
|
|
|
|
* @param string Sort order [ASC, DESC]
|
|
|
|
* @param string $sort_order Sort order [ASC, DESC]
|
|
|
|
* @return array Indexed array with message IDs
|
|
|
|
* @return array Indexed array with message IDs
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
function thread_index($mbox_name='', $sort_field=NULL, $sort_order=NULL)
|
|
|
|
function thread_index($mbox_name='', $sort_field=NULL, $sort_order=NULL)
|
|
|
@ -1303,10 +1344,10 @@ class rcube_imap
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Return array of threaded messages (all, not only roots)
|
|
|
|
* Return array of threaded messages (all, not only roots)
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param string Mailbox to get index from
|
|
|
|
* @param string $mailbox Mailbox to get index from
|
|
|
|
* @param array Threaded messages array (see _fetch_threads())
|
|
|
|
* @param array $thread_tree Threaded messages array (see _fetch_threads())
|
|
|
|
* @param array Message IDs if we know what we need (e.g. search result)
|
|
|
|
* @param array $ids Message IDs if we know what we need (e.g. search result)
|
|
|
|
* for better performance
|
|
|
|
* for better performance
|
|
|
|
* @return array Indexed array with message IDs
|
|
|
|
* @return array Indexed array with message IDs
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @access private
|
|
|
|
* @access private
|
|
|
@ -1336,6 +1377,7 @@ class rcube_imap
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
|
|
|
|
* @param string $mailbox Mailbox name
|
|
|
|
* @access private
|
|
|
|
* @access private
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
private function sync_header_index($mailbox)
|
|
|
|
private function sync_header_index($mailbox)
|
|
|
@ -1430,10 +1472,10 @@ class rcube_imap
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Invoke search request to IMAP server
|
|
|
|
* Invoke search request to IMAP server
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param string mailbox name to search in
|
|
|
|
* @param string $mbox_name mailbox name to search in
|
|
|
|
* @param string search string
|
|
|
|
* @param string $str search string
|
|
|
|
* @param string search string charset
|
|
|
|
* @param string $charset search string charset
|
|
|
|
* @param string header field to sort by
|
|
|
|
* @param string $sort_field header field to sort by
|
|
|
|
* @return array search results as list of message ids
|
|
|
|
* @return array search results as list of message ids
|
|
|
|
* @access public
|
|
|
|
* @access public
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -1456,6 +1498,10 @@ class rcube_imap
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Private search method
|
|
|
|
* Private search method
|
|
|
|
*
|
|
|
|
*
|
|
|
|
|
|
|
|
* @param string $mailbox Mailbox name
|
|
|
|
|
|
|
|
* @param string $criteria Search criteria
|
|
|
|
|
|
|
|
* @param string $charset Charset
|
|
|
|
|
|
|
|
* @param string $sort_field Sorting field
|
|
|
|
* @return array search results as list of message ids
|
|
|
|
* @return array search results as list of message ids
|
|
|
|
* @access private
|
|
|
|
* @access private
|
|
|
|
* @see rcube_imap::search()
|
|
|
|
* @see rcube_imap::search()
|
|
|
@ -1532,9 +1578,9 @@ class rcube_imap
|
|
|
|
* Direct (real and simple) SEARCH request to IMAP server,
|
|
|
|
* Direct (real and simple) SEARCH request to IMAP server,
|
|
|
|
* without result sorting and caching
|
|
|
|
* without result sorting and caching
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param string Mailbox name to search in
|
|
|
|
* @param string $mbox_name Mailbox name to search in
|
|
|
|
* @param string Search string
|
|
|
|
* @param string $str Search string
|
|
|
|
* @param boolean True if UIDs should be returned
|
|
|
|
* @param boolean $ret_uid True if UIDs should be returned
|
|
|
|
* @return array Search results as list of message IDs or UIDs
|
|
|
|
* @return array Search results as list of message IDs or UIDs
|
|
|
|
* @access public
|
|
|
|
* @access public
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -1552,9 +1598,9 @@ class rcube_imap
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Converts charset of search criteria string
|
|
|
|
* Converts charset of search criteria string
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param string Search string
|
|
|
|
* @param string $str Search string
|
|
|
|
* @param string Original charset
|
|
|
|
* @param string $charset Original charset
|
|
|
|
* @param string Destination charset (default US-ASCII)
|
|
|
|
* @param string $dest_charset Destination charset (default US-ASCII)
|
|
|
|
* @return string Search string
|
|
|
|
* @return string Search string
|
|
|
|
* @access private
|
|
|
|
* @access private
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -1585,9 +1631,9 @@ class rcube_imap
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Sort thread
|
|
|
|
* Sort thread
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param string Mailbox name
|
|
|
|
* @param string $mailbox Mailbox name
|
|
|
|
* @param array Unsorted thread tree (rcube_imap_generic::thread() result)
|
|
|
|
* @param array $thread_tree Unsorted thread tree (rcube_imap_generic::thread() result)
|
|
|
|
* @param array Message IDs if we know what we need (e.g. search result)
|
|
|
|
* @param array $ids Message IDs if we know what we need (e.g. search result)
|
|
|
|
* @return array Sorted roots IDs
|
|
|
|
* @return array Sorted roots IDs
|
|
|
|
* @access private
|
|
|
|
* @access private
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -1632,8 +1678,8 @@ class rcube_imap
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* THREAD=REFS sorting implementation
|
|
|
|
* THREAD=REFS sorting implementation
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param array Thread tree array (message identifiers as keys)
|
|
|
|
* @param array $tree Thread tree array (message identifiers as keys)
|
|
|
|
* @param array Array of sorted message identifiers
|
|
|
|
* @param array $index Array of sorted message identifiers
|
|
|
|
* @return array Array of sorted roots messages
|
|
|
|
* @return array Array of sorted roots messages
|
|
|
|
* @access private
|
|
|
|
* @access private
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -1693,6 +1739,7 @@ class rcube_imap
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Check if the given message ID is part of the current search set
|
|
|
|
* Check if the given message ID is part of the current search set
|
|
|
|
*
|
|
|
|
*
|
|
|
|
|
|
|
|
* @param string $msgid Message id
|
|
|
|
* @return boolean True on match or if no search request is stored
|
|
|
|
* @return boolean True on match or if no search request is stored
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
function in_searchset($msgid)
|
|
|
|
function in_searchset($msgid)
|
|
|
@ -1711,10 +1758,10 @@ class rcube_imap
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Return message headers object of a specific message
|
|
|
|
* Return message headers object of a specific message
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param int Message ID
|
|
|
|
* @param int $id Message ID
|
|
|
|
* @param string Mailbox to read from
|
|
|
|
* @param string $mbox_name Mailbox to read from
|
|
|
|
* @param boolean True if $id is the message UID
|
|
|
|
* @param boolean $is_uid True if $id is the message UID
|
|
|
|
* @param boolean True if we need also BODYSTRUCTURE in headers
|
|
|
|
* @param boolean $bodystr True if we need also BODYSTRUCTURE in headers
|
|
|
|
* @return object Message headers representation
|
|
|
|
* @return object Message headers representation
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
function get_headers($id, $mbox_name=NULL, $is_uid=true, $bodystr=false)
|
|
|
|
function get_headers($id, $mbox_name=NULL, $is_uid=true, $bodystr=false)
|
|
|
@ -1745,8 +1792,8 @@ class rcube_imap
|
|
|
|
* Fetch body structure from the IMAP server and build
|
|
|
|
* Fetch body structure from the IMAP server and build
|
|
|
|
* an object structure similar to the one generated by PEAR::Mail_mimeDecode
|
|
|
|
* an object structure similar to the one generated by PEAR::Mail_mimeDecode
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param int Message UID to fetch
|
|
|
|
* @param int $uid Message UID to fetch
|
|
|
|
* @param string Message BODYSTRUCTURE string (optional)
|
|
|
|
* @param string $structure_str Message BODYSTRUCTURE string (optional)
|
|
|
|
* @return object rcube_message_part Message part tree or False on failure
|
|
|
|
* @return object rcube_message_part Message part tree or False on failure
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
function &get_structure($uid, $structure_str='')
|
|
|
|
function &get_structure($uid, $structure_str='')
|
|
|
@ -1817,6 +1864,9 @@ class rcube_imap
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Build message part object
|
|
|
|
* Build message part object
|
|
|
|
*
|
|
|
|
*
|
|
|
|
|
|
|
|
* @param array $part
|
|
|
|
|
|
|
|
* @param int $count
|
|
|
|
|
|
|
|
* @param string $parent
|
|
|
|
* @access private
|
|
|
|
* @access private
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
function &_structure_part($part, $count=0, $parent='', $mime_headers=null)
|
|
|
|
function &_structure_part($part, $count=0, $parent='', $mime_headers=null)
|
|
|
@ -2004,8 +2054,8 @@ class rcube_imap
|
|
|
|
* Set attachment filename from message part structure
|
|
|
|
* Set attachment filename from message part structure
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @access private
|
|
|
|
* @access private
|
|
|
|
* @param object rcube_message_part Part object
|
|
|
|
* @param rcube_message_part $part Part object
|
|
|
|
* @param string Part's raw headers
|
|
|
|
* @param string $headers Part's raw headers
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
private function _set_part_filename(&$part, $headers=null)
|
|
|
|
private function _set_part_filename(&$part, $headers=null)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -2125,7 +2175,7 @@ class rcube_imap
|
|
|
|
* Get charset name from message structure (first part)
|
|
|
|
* Get charset name from message structure (first part)
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @access private
|
|
|
|
* @access private
|
|
|
|
* @param array Message structure
|
|
|
|
* @param array $structure Message structure
|
|
|
|
* @return string Charset name
|
|
|
|
* @return string Charset name
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
function _structure_charset($structure)
|
|
|
|
function _structure_charset($structure)
|
|
|
@ -2141,11 +2191,11 @@ class rcube_imap
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Fetch message body of a specific message from the server
|
|
|
|
* Fetch message body of a specific message from the server
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param int Message UID
|
|
|
|
* @param int $uid Message UID
|
|
|
|
* @param string Part number
|
|
|
|
* @param string $part Part number
|
|
|
|
* @param object rcube_message_part Part object created by get_structure()
|
|
|
|
* @param rcube_message_part $o_part Part object created by get_structure()
|
|
|
|
* @param mixed True to print part, ressource to write part contents in
|
|
|
|
* @param mixed $print True to print part, ressource to write part contents in
|
|
|
|
* @param resource File pointer to save the message part
|
|
|
|
* @param resource $fp File pointer to save the message part
|
|
|
|
* @return string Message/part body if not printed
|
|
|
|
* @return string Message/part body if not printed
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
function &get_message_part($uid, $part=1, $o_part=NULL, $print=NULL, $fp=NULL)
|
|
|
|
function &get_message_part($uid, $part=1, $o_part=NULL, $print=NULL, $fp=NULL)
|
|
|
@ -2191,8 +2241,8 @@ class rcube_imap
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Fetch message body of a specific message from the server
|
|
|
|
* Fetch message body of a specific message from the server
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param int Message UID
|
|
|
|
* @param int $uid Message UID
|
|
|
|
* @return string Message/part body
|
|
|
|
* @return string $part Message/part body
|
|
|
|
* @see rcube_imap::get_message_part()
|
|
|
|
* @see rcube_imap::get_message_part()
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
function &get_body($uid, $part=1)
|
|
|
|
function &get_body($uid, $part=1)
|
|
|
@ -2206,7 +2256,7 @@ class rcube_imap
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Returns the whole message source as string
|
|
|
|
* Returns the whole message source as string
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param int Message UID
|
|
|
|
* @param int $uid Message UID
|
|
|
|
* @return string Message source string
|
|
|
|
* @return string Message source string
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
function &get_raw_body($uid)
|
|
|
|
function &get_raw_body($uid)
|
|
|
@ -2218,7 +2268,7 @@ class rcube_imap
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Returns the message headers as string
|
|
|
|
* Returns the message headers as string
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param int Message UID
|
|
|
|
* @param int $uid Message UID
|
|
|
|
* @return string Message headers string
|
|
|
|
* @return string Message headers string
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
function &get_raw_headers($uid)
|
|
|
|
function &get_raw_headers($uid)
|
|
|
@ -2230,7 +2280,7 @@ class rcube_imap
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Sends the whole message source to stdout
|
|
|
|
* Sends the whole message source to stdout
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param int Message UID
|
|
|
|
* @param int $uid Message UID
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
function print_raw_body($uid)
|
|
|
|
function print_raw_body($uid)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -2241,10 +2291,10 @@ class rcube_imap
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Set message flag to one or several messages
|
|
|
|
* Set message flag to one or several messages
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param mixed Message UIDs as array or comma-separated string, or '*'
|
|
|
|
* @param mixed $uids Message UIDs as array or comma-separated string, or '*'
|
|
|
|
* @param string Flag to set: SEEN, UNDELETED, DELETED, RECENT, ANSWERED, DRAFT, MDNSENT
|
|
|
|
* @param string $flag Flag to set: SEEN, UNDELETED, DELETED, RECENT, ANSWERED, DRAFT, MDNSENT
|
|
|
|
* @param string Folder name
|
|
|
|
* @param string $mbox_name Folder name
|
|
|
|
* @param boolean True to skip message cache clean up
|
|
|
|
* @param boolean $skip_cache True to skip message cache clean up
|
|
|
|
* @return int Number of flagged messages, -1 on failure
|
|
|
|
* @return int Number of flagged messages, -1 on failure
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
function set_flag($uids, $flag, $mbox_name=NULL, $skip_cache=false)
|
|
|
|
function set_flag($uids, $flag, $mbox_name=NULL, $skip_cache=false)
|
|
|
@ -2284,9 +2334,9 @@ class rcube_imap
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Remove message flag for one or several messages
|
|
|
|
* Remove message flag for one or several messages
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param mixed Message UIDs as array or comma-separated string, or '*'
|
|
|
|
* @param mixed $uids Message UIDs as array or comma-separated string, or '*'
|
|
|
|
* @param string Flag to unset: SEEN, DELETED, RECENT, ANSWERED, DRAFT, MDNSENT
|
|
|
|
* @param string $flag Flag to unset: SEEN, DELETED, RECENT, ANSWERED, DRAFT, MDNSENT
|
|
|
|
* @param string Folder name
|
|
|
|
* @param string $mbox_name Folder name
|
|
|
|
* @return int Number of flagged messages, -1 on failure
|
|
|
|
* @return int Number of flagged messages, -1 on failure
|
|
|
|
* @see set_flag
|
|
|
|
* @see set_flag
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -2299,10 +2349,10 @@ class rcube_imap
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Append a mail message (source) to a specific mailbox
|
|
|
|
* Append a mail message (source) to a specific mailbox
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param string Target mailbox
|
|
|
|
* @param string $mbox_name Target mailbox
|
|
|
|
* @param string The message source string or filename
|
|
|
|
* @param string $message The message source string or filename
|
|
|
|
* @param string Headers string if $message contains only the body
|
|
|
|
* @param string $headers Headers string if $message contains only the body
|
|
|
|
* @param boolean True if $message is a filename
|
|
|
|
* @param boolean $is_file True if $message is a filename
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @return boolean True on success, False on error
|
|
|
|
* @return boolean True on success, False on error
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -2330,9 +2380,9 @@ class rcube_imap
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Move a message from one mailbox to another
|
|
|
|
* Move a message from one mailbox to another
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param mixed Message UIDs as array or comma-separated string, or '*'
|
|
|
|
* @param mixed $uids Message UIDs as array or comma-separated string, or '*'
|
|
|
|
* @param string Target mailbox
|
|
|
|
* @param string $to_mbox Target mailbox
|
|
|
|
* @param string Source mailbox
|
|
|
|
* @param string $from_mbox Source mailbox
|
|
|
|
* @return boolean True on success, False on error
|
|
|
|
* @return boolean True on success, False on error
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
function move_message($uids, $to_mbox, $from_mbox='')
|
|
|
|
function move_message($uids, $to_mbox, $from_mbox='')
|
|
|
@ -2411,9 +2461,9 @@ class rcube_imap
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Copy a message from one mailbox to another
|
|
|
|
* Copy a message from one mailbox to another
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param mixed Message UIDs as array or comma-separated string, or '*'
|
|
|
|
* @param mixed $uids Message UIDs as array or comma-separated string, or '*'
|
|
|
|
* @param string Target mailbox
|
|
|
|
* @param string $to_mbox Target mailbox
|
|
|
|
* @param string Source mailbox
|
|
|
|
* @param string $from_mbox Source mailbox
|
|
|
|
* @return boolean True on success, False on error
|
|
|
|
* @return boolean True on success, False on error
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
function copy_message($uids, $to_mbox, $from_mbox='')
|
|
|
|
function copy_message($uids, $to_mbox, $from_mbox='')
|
|
|
@ -2452,8 +2502,8 @@ class rcube_imap
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Mark messages as deleted and expunge mailbox
|
|
|
|
* Mark messages as deleted and expunge mailbox
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param mixed Message UIDs as array or comma-separated string, or '*'
|
|
|
|
* @param mixed $uids Message UIDs as array or comma-separated string, or '*'
|
|
|
|
* @param string Source mailbox
|
|
|
|
* @param string $mbox_name Source mailbox
|
|
|
|
* @return boolean True on success, False on error
|
|
|
|
* @return boolean True on success, False on error
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
function delete_message($uids, $mbox_name='')
|
|
|
|
function delete_message($uids, $mbox_name='')
|
|
|
@ -2506,7 +2556,7 @@ class rcube_imap
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Clear all messages in a specific mailbox
|
|
|
|
* Clear all messages in a specific mailbox
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param string Mailbox name
|
|
|
|
* @param string $mbox_name Mailbox name
|
|
|
|
* @return int Above 0 on success
|
|
|
|
* @return int Above 0 on success
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
function clear_mailbox($mbox_name=NULL)
|
|
|
|
function clear_mailbox($mbox_name=NULL)
|
|
|
@ -2535,8 +2585,8 @@ class rcube_imap
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Send IMAP expunge command and clear cache
|
|
|
|
* Send IMAP expunge command and clear cache
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param string Mailbox name
|
|
|
|
* @param string $mbox_name Mailbox name
|
|
|
|
* @param boolean False if cache should not be cleared
|
|
|
|
* @param boolean $clear_cache False if cache should not be cleared
|
|
|
|
* @return boolean True on success
|
|
|
|
* @return boolean True on success
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
function expunge($mbox_name='', $clear_cache=true)
|
|
|
|
function expunge($mbox_name='', $clear_cache=true)
|
|
|
@ -2549,9 +2599,9 @@ class rcube_imap
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Send IMAP expunge command and clear cache
|
|
|
|
* Send IMAP expunge command and clear cache
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param string Mailbox name
|
|
|
|
* @param string $mailbox Mailbox name
|
|
|
|
* @param boolean False if cache should not be cleared
|
|
|
|
* @param boolean $clear_cache False if cache should not be cleared
|
|
|
|
* @param mixed Message UIDs as array or comma-separated string, or '*'
|
|
|
|
* @param mixed $uids Message UIDs as array or comma-separated string, or '*'
|
|
|
|
* @return boolean True on success
|
|
|
|
* @return boolean True on success
|
|
|
|
* @access private
|
|
|
|
* @access private
|
|
|
|
* @see rcube_imap::expunge()
|
|
|
|
* @see rcube_imap::expunge()
|
|
|
@ -2577,8 +2627,8 @@ class rcube_imap
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Parse message UIDs input
|
|
|
|
* Parse message UIDs input
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param mixed UIDs array or comma-separated list or '*' or '1:*'
|
|
|
|
* @param mixed $uids UIDs array or comma-separated list or '*' or '1:*'
|
|
|
|
* @param string Mailbox name
|
|
|
|
* @param string $mailbox Mailbox name
|
|
|
|
* @return array Two elements array with UIDs converted to list and ALL flag
|
|
|
|
* @return array Two elements array with UIDs converted to list and ALL flag
|
|
|
|
* @access private
|
|
|
|
* @access private
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -2620,8 +2670,8 @@ class rcube_imap
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Translate UID to message ID
|
|
|
|
* Translate UID to message ID
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param int Message UID
|
|
|
|
* @param int $uid Message UID
|
|
|
|
* @param string Mailbox name
|
|
|
|
* @param string $mbox_name Mailbox name
|
|
|
|
* @return int Message ID
|
|
|
|
* @return int Message ID
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
function get_id($uid, $mbox_name=NULL)
|
|
|
|
function get_id($uid, $mbox_name=NULL)
|
|
|
@ -2634,8 +2684,8 @@ class rcube_imap
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Translate message number to UID
|
|
|
|
* Translate message number to UID
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param int Message ID
|
|
|
|
* @param int $id Message ID
|
|
|
|
* @param string Mailbox name
|
|
|
|
* @param string $mbox_name Mailbox name
|
|
|
|
* @return int Message UID
|
|
|
|
* @return int Message UID
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
function get_uid($id,$mbox_name=NULL)
|
|
|
|
function get_uid($id,$mbox_name=NULL)
|
|
|
@ -2655,8 +2705,8 @@ class rcube_imap
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* Converts mailbox name with root dir first
|
|
|
|
* Converts mailbox name with root dir first
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param string Optional root folder
|
|
|
|
* @param string $root Optional root folder
|
|
|
|
* @param string Optional filter for mailbox listing
|
|
|
|
* @param string $filter Optional filter for mailbox listing
|
|
|
|
* @return array List of mailboxes/folders
|
|
|
|
* @return array List of mailboxes/folders
|
|
|
|
* @access public
|
|
|
|
* @access public
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -2685,6 +2735,8 @@ class rcube_imap
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Private method for mailbox listing
|
|
|
|
* Private method for mailbox listing
|
|
|
|
*
|
|
|
|
*
|
|
|
|
|
|
|
|
* @param string $root Optional root folder
|
|
|
|
|
|
|
|
* @param string $filter Optional filter for mailbox listing
|
|
|
|
* @return array List of mailboxes/folders
|
|
|
|
* @return array List of mailboxes/folders
|
|
|
|
* @see rcube_imap::list_mailboxes()
|
|
|
|
* @see rcube_imap::list_mailboxes()
|
|
|
|
* @access private
|
|
|
|
* @access private
|
|
|
@ -2723,8 +2775,8 @@ class rcube_imap
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Get a list of all folders available on the IMAP server
|
|
|
|
* Get a list of all folders available on the IMAP server
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param string IMAP root dir
|
|
|
|
* @param string $root IMAP root dir
|
|
|
|
* @param string Optional filter for mailbox listing
|
|
|
|
* @param string $filter Optional filter for mailbox listing
|
|
|
|
* @return array Indexed array with folder names
|
|
|
|
* @return array Indexed array with folder names
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
function list_unsubscribed($root='', $filter='*')
|
|
|
|
function list_unsubscribed($root='', $filter='*')
|
|
|
@ -2780,7 +2832,7 @@ class rcube_imap
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Subscribe to a specific mailbox(es)
|
|
|
|
* Subscribe to a specific mailbox(es)
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param array Mailbox name(s)
|
|
|
|
* @param array $a_mboxes Mailbox name(s)
|
|
|
|
* @return boolean True on success
|
|
|
|
* @return boolean True on success
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
function subscribe($a_mboxes)
|
|
|
|
function subscribe($a_mboxes)
|
|
|
@ -2796,7 +2848,7 @@ class rcube_imap
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Unsubscribe mailboxes
|
|
|
|
* Unsubscribe mailboxes
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param array Mailbox name(s)
|
|
|
|
* @param array $a_mboxes Mailbox name(s)
|
|
|
|
* @return boolean True on success
|
|
|
|
* @return boolean True on success
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
function unsubscribe($a_mboxes)
|
|
|
|
function unsubscribe($a_mboxes)
|
|
|
@ -2812,8 +2864,8 @@ class rcube_imap
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Create a new mailbox on the server and register it in local cache
|
|
|
|
* Create a new mailbox on the server and register it in local cache
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param string New mailbox name (as utf-7 string)
|
|
|
|
* @param string $name New mailbox name (as utf-7 string)
|
|
|
|
* @param boolean True if the new mailbox should be subscribed
|
|
|
|
* @param boolean $subscribe True if the new mailbox should be subscribed
|
|
|
|
* @param string Name of the created mailbox, false on error
|
|
|
|
* @param string Name of the created mailbox, false on error
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
function create_mailbox($name, $subscribe=false)
|
|
|
|
function create_mailbox($name, $subscribe=false)
|
|
|
@ -2836,8 +2888,8 @@ class rcube_imap
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Set a new name to an existing mailbox
|
|
|
|
* Set a new name to an existing mailbox
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param string Mailbox to rename (as utf-7 string)
|
|
|
|
* @param string $mbox_name Mailbox to rename (as utf-7 string)
|
|
|
|
* @param string New mailbox name (as utf-7 string)
|
|
|
|
* @param string $new_name New mailbox name (as utf-7 string)
|
|
|
|
* @return string Name of the renames mailbox, False on error
|
|
|
|
* @return string Name of the renames mailbox, False on error
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
function rename_mailbox($mbox_name, $new_name)
|
|
|
|
function rename_mailbox($mbox_name, $new_name)
|
|
|
@ -2889,7 +2941,7 @@ class rcube_imap
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Remove mailboxes from server
|
|
|
|
* Remove mailboxes from server
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param string Mailbox name(s) string/array
|
|
|
|
* @param string|array $mbox_name sMailbox name(s) string/array
|
|
|
|
* @return boolean True on success
|
|
|
|
* @return boolean True on success
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
function delete_mailbox($mbox_name)
|
|
|
|
function delete_mailbox($mbox_name)
|
|
|
@ -2956,8 +3008,8 @@ class rcube_imap
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Checks if folder exists and is subscribed
|
|
|
|
* Checks if folder exists and is subscribed
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param string Folder name
|
|
|
|
* @param string $mbox_name Folder name
|
|
|
|
* @param boolean Enable subscription checking
|
|
|
|
* @param boolean $subscription Enable subscription checking
|
|
|
|
* @return boolean TRUE or FALSE
|
|
|
|
* @return boolean TRUE or FALSE
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
function mailbox_exists($mbox_name, $subscription=false)
|
|
|
|
function mailbox_exists($mbox_name, $subscription=false)
|
|
|
@ -2990,8 +3042,8 @@ class rcube_imap
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Modify folder name for input/output according to root dir and namespace
|
|
|
|
* Modify folder name for input/output according to root dir and namespace
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param string Folder name
|
|
|
|
* @param string $mbox_name Folder name
|
|
|
|
* @param string Mode
|
|
|
|
* @param string $mode Mode
|
|
|
|
* @return string Folder name
|
|
|
|
* @return string Folder name
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
function mod_mailbox($mbox_name, $mode='in')
|
|
|
|
function mod_mailbox($mbox_name, $mode='in')
|
|
|
@ -3015,6 +3067,9 @@ class rcube_imap
|
|
|
|
* --------------------------------*/
|
|
|
|
* --------------------------------*/
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
|
|
|
|
* Enable or disable caching
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @param boolean $set Flag
|
|
|
|
* @access public
|
|
|
|
* @access public
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
function set_caching($set)
|
|
|
|
function set_caching($set)
|
|
|
@ -3026,6 +3081,10 @@ class rcube_imap
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
|
|
|
|
* Returns cached value
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @param string $key Cache key
|
|
|
|
|
|
|
|
* @return mixed
|
|
|
|
* @access public
|
|
|
|
* @access public
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
function get_cache($key)
|
|
|
|
function get_cache($key)
|
|
|
@ -3039,6 +3098,10 @@ class rcube_imap
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
|
|
|
|
* Update cache
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @param string $key Cache key
|
|
|
|
|
|
|
|
* @param mixed $data Data
|
|
|
|
* @access private
|
|
|
|
* @access private
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
private function update_cache($key, $data)
|
|
|
|
private function update_cache($key, $data)
|
|
|
@ -3049,6 +3112,8 @@ class rcube_imap
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
|
|
|
|
* Writes the cache
|
|
|
|
|
|
|
|
*
|
|
|
|
* @access private
|
|
|
|
* @access private
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
private function write_cache()
|
|
|
|
private function write_cache()
|
|
|
@ -3062,6 +3127,9 @@ class rcube_imap
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
|
|
|
|
* Clears the cache.
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @param string $key Cache key
|
|
|
|
* @access public
|
|
|
|
* @access public
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
function clear_cache($key=NULL)
|
|
|
|
function clear_cache($key=NULL)
|
|
|
@ -3085,6 +3153,10 @@ class rcube_imap
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
|
|
|
|
* Returns cached entry
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @param string $key Cache key
|
|
|
|
|
|
|
|
* @return mixed Cached value
|
|
|
|
* @access private
|
|
|
|
* @access private
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
private function _read_cache_record($key)
|
|
|
|
private function _read_cache_record($key)
|
|
|
@ -3110,6 +3182,10 @@ class rcube_imap
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
|
|
|
|
* Writes single cache record
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @param string $key Cache key
|
|
|
|
|
|
|
|
* @param mxied $data Cache value
|
|
|
|
* @access private
|
|
|
|
* @access private
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
private function _write_cache_record($key, $data)
|
|
|
|
private function _write_cache_record($key, $data)
|
|
|
@ -3153,6 +3229,9 @@ class rcube_imap
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
|
|
|
|
* Clears cache for single record
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @param string $ket Cache key
|
|
|
|
* @access private
|
|
|
|
* @access private
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
private function _clear_cache_record($key)
|
|
|
|
private function _clear_cache_record($key)
|
|
|
@ -3176,8 +3255,8 @@ class rcube_imap
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Checks if the cache is up-to-date
|
|
|
|
* Checks if the cache is up-to-date
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param string Mailbox name
|
|
|
|
* @param string $mailbox Mailbox name
|
|
|
|
* @param string Internal cache key
|
|
|
|
* @param string $cache_key Internal cache key
|
|
|
|
* @return int Cache status: -3 = off, -2 = incomplete, -1 = dirty, 1 = OK
|
|
|
|
* @return int Cache status: -3 = off, -2 = incomplete, -1 = dirty, 1 = OK
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
private function check_cache_status($mailbox, $cache_key)
|
|
|
|
private function check_cache_status($mailbox, $cache_key)
|
|
|
@ -3232,6 +3311,11 @@ class rcube_imap
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
|
|
|
|
* @param string $key Cache key
|
|
|
|
|
|
|
|
* @param string $from
|
|
|
|
|
|
|
|
* @param string $to
|
|
|
|
|
|
|
|
* @param string $sort_field
|
|
|
|
|
|
|
|
* @param string $sort_order
|
|
|
|
* @access private
|
|
|
|
* @access private
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
private function get_message_cache($key, $from, $to, $sort_field, $sort_order)
|
|
|
|
private function get_message_cache($key, $from, $to, $sort_field, $sort_order)
|
|
|
@ -3271,6 +3355,9 @@ class rcube_imap
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
|
|
|
|
* @param string $key Cache key
|
|
|
|
|
|
|
|
* @param int $uid User id
|
|
|
|
|
|
|
|
* @return mixed
|
|
|
|
* @access private
|
|
|
|
* @access private
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
private function &get_cached_message($key, $uid)
|
|
|
|
private function &get_cached_message($key, $uid)
|
|
|
@ -3302,6 +3389,10 @@ class rcube_imap
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
|
|
|
|
* @param string $key Cache key
|
|
|
|
|
|
|
|
* @param boolean $force Force flag
|
|
|
|
|
|
|
|
* @param string $sort_field
|
|
|
|
|
|
|
|
* @param string $sort_order
|
|
|
|
* @access private
|
|
|
|
* @access private
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
private function get_message_cache_index($key, $sort_field='idx', $sort_order='ASC')
|
|
|
|
private function get_message_cache_index($key, $sort_field='idx', $sort_order='ASC')
|
|
|
@ -3439,6 +3530,8 @@ class rcube_imap
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
|
|
|
|
* @param string $key Cache key
|
|
|
|
|
|
|
|
* @param int $start_index Start index
|
|
|
|
* @access private
|
|
|
|
* @access private
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
private function clear_message_cache($key, $start_index=1)
|
|
|
|
private function clear_message_cache($key, $start_index=1)
|
|
|
@ -3494,9 +3587,9 @@ class rcube_imap
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Split an address list into a structured array list
|
|
|
|
* Split an address list into a structured array list
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param string Input string
|
|
|
|
* @param string $input Input string
|
|
|
|
* @param int List only this number of addresses
|
|
|
|
* @param int $max List only this number of addresses
|
|
|
|
* @param boolean Decode address strings
|
|
|
|
* @param boolean $decode Decode address strings
|
|
|
|
* @return array Indexed list of addresses
|
|
|
|
* @return array Indexed list of addresses
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
function decode_address_list($input, $max=null, $decode=true)
|
|
|
|
function decode_address_list($input, $max=null, $decode=true)
|
|
|
@ -3544,8 +3637,8 @@ class rcube_imap
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Decode a message header value
|
|
|
|
* Decode a message header value
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param string Header value
|
|
|
|
* @param string $input Header value
|
|
|
|
* @param boolean Remove quotes if necessary
|
|
|
|
* @param boolean $remove_quotas Remove quotes if necessary
|
|
|
|
* @return string Decoded string
|
|
|
|
* @return string Decoded string
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
function decode_header($input, $remove_quotes=false)
|
|
|
|
function decode_header($input, $remove_quotes=false)
|
|
|
@ -3617,6 +3710,8 @@ class rcube_imap
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Decode a part of a mime-encoded string
|
|
|
|
* Decode a part of a mime-encoded string
|
|
|
|
*
|
|
|
|
*
|
|
|
|
|
|
|
|
* @param string $str String to decode
|
|
|
|
|
|
|
|
* @return string Decoded string
|
|
|
|
* @access private
|
|
|
|
* @access private
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
private function _decode_mime_string_part($str)
|
|
|
|
private function _decode_mime_string_part($str)
|
|
|
@ -3647,8 +3742,8 @@ class rcube_imap
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Decode a mime part
|
|
|
|
* Decode a mime part
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param string Input string
|
|
|
|
* @param string $input Input string
|
|
|
|
* @param string Part encoding
|
|
|
|
* @param string $encoding Part encoding
|
|
|
|
* @return string Decoded string
|
|
|
|
* @return string Decoded string
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
function mime_decode($input, $encoding='7bit')
|
|
|
|
function mime_decode($input, $encoding='7bit')
|
|
|
@ -3673,8 +3768,8 @@ class rcube_imap
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Convert body charset to RCMAIL_CHARSET according to the ctype_parameters
|
|
|
|
* Convert body charset to RCMAIL_CHARSET according to the ctype_parameters
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param string Part body to decode
|
|
|
|
* @param string $body Part body to decode
|
|
|
|
* @param string Charset to convert from
|
|
|
|
* @param string $ctype_param Charset to convert from
|
|
|
|
* @return string Content converted to internal charset
|
|
|
|
* @return string Content converted to internal charset
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
function charset_decode($body, $ctype_param)
|
|
|
|
function charset_decode($body, $ctype_param)
|
|
|
@ -3693,6 +3788,9 @@ class rcube_imap
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Validate the given input and save to local properties
|
|
|
|
* Validate the given input and save to local properties
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @param string $sort_field Sort column
|
|
|
|
|
|
|
|
* @param string $sort_order Sort order
|
|
|
|
* @access private
|
|
|
|
* @access private
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
private function _set_sort_order($sort_field, $sort_order)
|
|
|
|
private function _set_sort_order($sort_field, $sort_order)
|
|
|
@ -3705,6 +3803,8 @@ class rcube_imap
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Sort mailboxes first by default folders and then in alphabethical order
|
|
|
|
* Sort mailboxes first by default folders and then in alphabethical order
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @param array $a_folders Mailboxes list
|
|
|
|
* @access private
|
|
|
|
* @access private
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
private function _sort_mailbox_list($a_folders)
|
|
|
|
private function _sort_mailbox_list($a_folders)
|
|
|
@ -3762,6 +3862,9 @@ class rcube_imap
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
|
|
|
|
* @param int $uid User id
|
|
|
|
|
|
|
|
* @param string $mbox_name Mailbox name
|
|
|
|
|
|
|
|
* @return int
|
|
|
|
* @access private
|
|
|
|
* @access private
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
private function _uid2id($uid, $mbox_name=NULL)
|
|
|
|
private function _uid2id($uid, $mbox_name=NULL)
|
|
|
@ -3776,6 +3879,9 @@ class rcube_imap
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
|
|
|
|
* @param int $id Id
|
|
|
|
|
|
|
|
* @param string $mbox_name Mailbox name
|
|
|
|
|
|
|
|
* @return int
|
|
|
|
* @access private
|
|
|
|
* @access private
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
private function _id2uid($id, $mbox_name=NULL)
|
|
|
|
private function _id2uid($id, $mbox_name=NULL)
|
|
|
@ -3980,7 +4086,7 @@ class rcube_header_sorter
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Set the predetermined sort order.
|
|
|
|
* Set the predetermined sort order.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param array Numerically indexed array of IMAP message sequence numbers
|
|
|
|
* @param array $seqnums Numerically indexed array of IMAP message sequence numbers
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
function set_sequence_numbers($seqnums)
|
|
|
|
function set_sequence_numbers($seqnums)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -3990,7 +4096,7 @@ class rcube_header_sorter
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Sort the array of header objects
|
|
|
|
* Sort the array of header objects
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param array Array of rcube_mail_header objects indexed by UID
|
|
|
|
* @param array $headers Array of rcube_mail_header objects indexed by UID
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
function sort_headers(&$headers)
|
|
|
|
function sort_headers(&$headers)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -4006,6 +4112,9 @@ class rcube_header_sorter
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Sort method called by uasort()
|
|
|
|
* Sort method called by uasort()
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @param rcube_mail_header $a
|
|
|
|
|
|
|
|
* @param rcube_mail_header $b
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
function compare_seqnums($a, $b)
|
|
|
|
function compare_seqnums($a, $b)
|
|
|
|
{
|
|
|
|
{
|
|
|
|