$bold_end = '';
}
- if (($mailbox == $sent_folder) || ($mailbox == $draft_folder)) {
+ if (handleAsSent($mailbox)) {
$italic = '<i>';
$italic_end = '</i>';
} else {
}
sqimap_mailbox_select($imapConnection, $mailbox);
- $issent = (($mailbox == $sent_folder) || ($mailbox == $draft_folder));
+ $issent = handleAsSent($mailbox);
if (!$use_cache) {
/* If it is sorted... */
if ($num_msgs >= 1) {
$msg = '';
}
- mail_message_listing_beginning
- ($imapConnection,
+ mail_message_listing_beginning( $imapConnection,
"move_messages.php?msg=$msg&mailbox=$urlMailbox&startMessage=$start_msg",
$mailbox, $sort, $msg_cnt_str, $paginator_str, $start_msg);
break;
case 2: /* from */
- if (($mailbox == $sent_folder)
- || ($mailbox == $draft_folder)) {
+ if (handleAsSent($mailbox)) {
echo ' <TD WIDTH="25%"><B>'. _("To") .'</B>';
} else {
echo ' <TD WIDTH="25%"><B>'. _("From") .'</B>';
function ShowSortButton($sort, $mailbox, $Up, $Down) {
/* Figure out which image we want to use. */
if ($sort != $Up && $sort != $Down) {
- $img = 'sort_none.gif';
+ $img = 'sort_none.png';
$which = $Up;
} elseif ($sort == $Up) {
- $img = 'up_pointer.gif';
+ $img = 'up_pointer.png';
$which = $Down;
} else {
- $img = 'down_pointer.gif';
+ $img = 'down_pointer.png';
$which = 6;
}
$sep = '|'; /* This will be used as a seperator. */
/* Get some paginator preference values. */
- $pg_sel = getPref($data_dir, $username, 'page_selector', SM_OPT_ON);
+ $pg_sel = getPref($data_dir, $username, 'page_selector', SMPREF_ON);
$pg_max = getPref($data_dir, $username, 'page_selector_max', PG_SEL_MAX);
/* Make sure that our start message number is not too big. */
return substr($subject, 0, $trim_val) . '...';
}
+function handleAsSent($mailbox) {
+ global $sent_folder, $draft_folder;
+ global $handleAsSent_result;
+
+ /* First check if this is the sent or draft folder. */
+ $handleAsSent_result = (($mailbox == $sent_folder)
+ || ($mailbox == $draft_folder));
+
+ /* Then check the result of the handleAsSent hook. */
+ do_hook('check_handleAsSent_result', $mailbox);
+
+ /* And return the result. */
+ return ($handleAsSent_result);
+}
+
?>