attachSelectedMessages (line
1407)
Attach messages to a compose session
int
attachSelectedMessages
(resource $imapConnection, array $aMsgHeaders)
-
resource
$imapConnection: imap connection
-
array
$aMsgHeaders
calcFetchColumns (line
850)
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
263)
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
This should go in imap_mailbox.php
void
handleAsSent
(string $mailbox)
handleMessageListForm (line
1236)
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()], array $aMailbox)
-
resource
$imapConnection: imap connection
-
array
$aMailbox: (reference) cached mailbox
-
string
$sButton: fake a submit button
-
array
$aUid: fake the $msg array
-
&$aMailbox
highlightMessage (line
686)
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
425)
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
905)
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
28)
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)
-
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
-
$account
truncateWithEntities (line
1166)
Truncates a string and take care of html encoded characters
string
truncateWithEntities
(string $s, int $iTrimAt)
-
string
$s: string to truncate
-
int
$iTrimAt: Trim at nn characters
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
741)
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