From: <pdo...@us...> - 2022-04-25 06:08:36
|
Revision: 14948 http://sourceforge.net/p/squirrelmail/code/14948 Author: pdontthink Date: 2022-04-25 06:08:34 +0000 (Mon, 25 Apr 2022) Log Message: ----------- Cause message subject to show in page title when message view is loaded in its own window/tab Modified Paths: -------------- branches/SM-1_4-STABLE/squirrelmail/functions/page_header.php Modified: branches/SM-1_4-STABLE/squirrelmail/functions/page_header.php =================================================================== --- branches/SM-1_4-STABLE/squirrelmail/functions/page_header.php 2022-04-13 22:41:54 UTC (rev 14947) +++ branches/SM-1_4-STABLE/squirrelmail/functions/page_header.php 2022-04-25 06:08:34 UTC (rev 14948) @@ -122,6 +122,13 @@ do_hook('generic_header'); } + // 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); + echo "\n<title>$title</title>$xtra\n"; // output <script> tags as needed (use array_unique so This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |