attachSelectedMessages (line
1506)
Attach messages to a compose session
int
attachSelectedMessages
(resource $imapConnection, array $aMsgHeaders)
-
resource
$imapConnection: imap connection
-
array
$aMsgHeaders
calcFetchColumns (line
870)
This function is a utility function for setting which headers should be
fetched. It takes into account the highlight list which requires extra headers to be fetch in order to make those rules work. It's called before the headers are fetched which happens in showMessagesForMailbox and when the next and prev links in read_body.php are used.
void
calcFetchColumns
( &$aMailbox, &$aProps, array $aMailbox, array $aProps)
-
array
$aMailbox: associative array with mailbox related vars
-
array
$aProps
-
&$aMailbox
-
&$aProps
fetchMessageHeaders (line
276)
Fetch the message headers for a mailbox. Settings are part of the aMailbox array. Dependent of the mailbox settings it deals with sort, thread and search If server sort is supported then SORT is also used for retrieving sorted search results
error
fetchMessageHeaders
(resource $imapConnection, &$aMailbox, array $aMailbox)
-
resource
$imapConnection: imap socket handle
-
array
$aMailbox: (reference) mailbox retrieved from sqm_api_mailbox_select
-
&$aMailbox
handleMessageListForm (line
1286)
Process messages list form and handle the cache gracefully. If $sButton and $aUid are provided as argument then you can fake a message list submit and use it i.e. in read_body.php for del move next and update the cache
string
handleMessageListForm
(resource $imapConnection, &$aMailbox, [string $sButton = ''], [array $aUid = array()], [string $targetMailbox = ''], [boolean $bypass_trash = NULL], array $aMailbox)
-
resource
$imapConnection: imap connection
-
array
$aMailbox: (reference) cached mailbox
-
string
$sButton: fake a submit button
-
array
$aUid: fake the $msg array
-
string
$targetMailbox: fake the target mailbox for move operations
-
boolean
$bypass_trash: fake the bypass trash checkbox for delete operations
-
&$aMailbox
highlightMessage (line
706)
Sets the row color if the provided column value pair matches a hightlight rule
bool
highlightMessage
(string $sCol, string $sVal, array $highlight_list, &$aFormat, array $aFormat)
-
string
$sCol: column name
-
string
$sVal: column value
-
array
$highlight_list: highlight rules
-
array
$aFormat: (reference) array where row color info is stored
-
&$aFormat
prepareMessageList (line
438)
Prepares the message headers for display inside a template. The links are calculated, color for row highlighting is calculated and optionally the strings are truncated.
array
prepareMessageList
( &$aMailbox, array $aProps, array $aMailbox)
-
array
$aMailbox: (reference) mailbox retrieved from sqm_api_mailbox_select
-
array
$aProps: properties
-
&$aMailbox
void
setUserPref
( $username, $pref, $value)
showMessagesForMailbox (line
925)
This function loops through a group of messages in the mailbox and shows them to the user.
void
showMessagesForMailbox
(resource $imapConnection, &$aMailbox, array $aProps, &$iError, array $aMailbox, int $iError)
-
resource
$imapConnection
-
array
$aMailbox: associative array with mailbox related vars
-
array
$aProps
-
int
$iError: error code, 0 is no error
-
&$aMailbox
-
&$iError
sqm_api_mailbox_select (line
39)
Selects a mailbox for header retrieval.
Cache control for message headers is embedded.
array
sqm_api_mailbox_select
(resource $imapConnection, $account, string $mailbox, array $aConfig, array $aProps, [boolean $handle_errors = true])
-
resource
$imapConnection: imap socket handle
-
string
$mailbox: mailbox to select and retrieve message headers from
-
array
$aConfig: array with system config settings and incoming vars
-
array
$aProps: mailbox specific properties
-
boolean
$handle_errors: When TRUE, IMAP errors are handled herein, causing an error to be displayed on screen and execution to stop and when FALSE, error status is returned to the caller (OPTIONAL; default is TRUE)
-
$account
Does the $srt $_GET var to field mapping
string
_getSortField
( $sort, bool $bServerSort, int $srt)
-
int
$srt: Field to sort on
-
bool
$bServerSort: Server sorting is true
-
$sort
_get_sorted_msgs_list (line
761)
Execute the sorting for a mailbox
int
_get_sorted_msgs_list
(resource $imapConnection, &$aMailbox, array $aMailbox)
-
resource
$imapConnection: Imap connection
-
array
$aMailbox: (reference) Mailbox retrieved with sqm_api_mailbox_select
-
&$aMailbox