X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=functions%2Fpage_header.php;fp=functions%2Fpage_header.php;h=339035ea55f846458cae61d61964f3530794d91d;hp=25638faa90cbadcb013a348a93795a730f134314;hb=660a647f8abb7477db1fed03e01951622b57b19d;hpb=977ce51a70dcf49e75f13d7075c7d755bc8127c3 diff --git a/functions/page_header.php b/functions/page_header.php index 25638faa..339035ea 100644 --- a/functions/page_header.php +++ b/functions/page_header.php @@ -181,6 +181,13 @@ function displayHtmlHeader( $title = 'SquirrelMail', $xtra = '', $do_hook = TRUE if (!empty($output)) trigger_error('A plugin on the "generic_header" hook has attempted to output directly to the browser', E_USER_ERROR); } + // Add message subject to page title (should only have an effect when loaded in its own browser window/tab) + // TODO: For search page, could add " - Search: $what" or something like that + global $message; + if (!empty($message) && !empty($message->rfc822_header) && !empty($message->rfc822_header->subject)) + // decodeHeader() should already encode the output, so no sm_encode_html_special_chars() + $title .= ' - ' . decodeHeader($message->rfc822_header->subject); + $header_tags .= $xtra; $oTemplate->assign('page_title', $title);