}
+/**
+ * Get Message List URI
+ *
+ * @param string $mailbox Current mailbox name (unencoded/raw)
+ * @param string $startMessage The mailbox page offset
+ * @param string $what Any current search parameters (OPTIONAL;
+ * default empty string)
+ *
+ * @return string The message list URI
+ *
+ * @since 1.5.2
+ *
+ */
+function get_message_list_uri($mailbox, $startMessage, $what='') {
+
+ global $base_uri;
+
+ $urlMailbox = urlencode($mailbox);
+
+ $list_xtra = "?where=read_body.php&what=$what&mailbox=" . $urlMailbox.
+ "&startMessage=$startMessage";
+
+ return $base_uri .'src/right_main.php'. $list_xtra;
+}
+
+
/**
* Encrypts password
*
/**
* Format message toolbar
*
- * @param string $mailbox Name of current mailbox
+ * @param array $aMailbox Current mailbox information array
* @param int $passed_id UID of current message
* @param int $passed_ent_id Id of entity within message
* @param object $message Current message object
}
}
- // Start with Search Results or Message List link.
- $list_xtra = "?where=read_body.php&what=$what&mailbox=" . $urlMailbox.
- "&startMessage=$startMessage";
- $msg_list_href = $base_uri .'src/right_main.php'. $list_xtra;
- $search_href = $where=='search.php' ? $base_uri .'src/search.php?'.$list_xtra : '';
+ $msg_list_href = get_message_list_uri($aMailbox['NAME'], $startMessage, $what);
+ if ($where == 'search.php')
+ $search_href = str_replace('read_body.php', 'search.php', $msg_list_href);
+ else
+ $search_href = '';
$comp_uri = $base_uri.'src/compose.php' .
'?passed_id=' . $passed_id .
sqsession_register($mailbox_cache,'mailbox_cache');
$_SESSION['mailbox_cache'] = $mailbox_cache;
+// message list URI is used in page header when on read_body
+$oTemplate->assign('message_list_href', get_message_list_uri($aMailbox['NAME'], $startMessage, $what));
+
displayPageHeader($color, $mailbox,'','');
formatMenubar($aMailbox, $passed_id, $passed_ent_id, $message,false);
formatEnvheader($aMailbox, $passed_id, $passed_ent_id, $message, $color, $FirstTimeSee);