* 'log' - Log information
* 'mailbox' - The IMAP mailbox
* 'msgtext' - The text of the message
+ * 'subject' - The subject
* 'to' - The To addresses
*
* FOR PREVIEW MODE:
* 'priority' - The X-Priority of the message ('low', 'high', 'normal')
* 'replyTo' - The Reply-to addresses
* 'save_as' - The save link
+ * 'title' - The title of the page
* </pre>
* @throws Horde_Exception
*/
}
/* Process the subject. */
- $result['subject'] = ($subject = $mime_headers->getValue('subject'))
- ? $imp_ui->getDisplaySubject($subject)
- : htmlspecialchars(_("[No Subject]"));
+ $subject = $mime_headers->getValue('subject');
+ if ($subject) {
+ $result['subject'] = $imp_ui->getDisplaySubject($subject);
+ if (!$preview) {
+ $result['title'] = htmlspecialchars($subject);
+ }
+ } else {
+ $result['subject'] = htmlspecialchars(_("[No Subject]"));
+ if (!$preview) {
+ $result['title'] = htmlspecialchars(_("[No Subject]"));
+ }
+ }
/* Get X-Priority. */
if (!$preview) {
Horde::addInlineScript($js_out);
Horde::addInlineScript(array_filter($js_onload), 'load');
-IMP_Dimp::header($show_msg_result['subject'], $scripts);
+IMP_Dimp::header($show_msg_result['title'], $scripts);
echo "<body>\n";
require IMP_TEMPLATES . '/chunks/message.php';
Horde::includeScriptFiles();