/**
* mailbox_display.php
*
- * Copyright (c) 1999-2001 The SquirrelMail Development Team
+ * Copyright (c) 1999-2002 The SquirrelMail Project Team
* Licensed under the GNU GPL. For full terms see the file COPYING.
*
* This contains functions that display mailbox information, such as the
$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>';
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);
+}
+
?>