Fix broken file downloads
[squirrelmail.git] / functions / page_header.php
index e7cf9733b2acee565a97b4e735d59643adf2c966..12be877beacb810354184395c2040db50f85a39c 100644 (file)
@@ -41,6 +41,10 @@ function displayHtmlHeader( $title = 'SquirrelMail', $xtra = '', $do_hook = TRUE
     $oTemplate->header('Pragma: no-cache'); // http 1.0 (rfc1945)
     $oTemplate->header('Cache-Control: private, no-cache, no-store'); // http 1.1 (rfc2616)
 
+    // don't show version as a security measure
+    //$oTemplate->header('X-Powered-By: SquirrelMail/' . SM_VERSION, FALSE);
+    $oTemplate->header('X-Powered-By: SquirrelMail', FALSE);
+
     $oTemplate->assign('frames', $frames);
     $oTemplate->assign('lang', $squirrelmail_language);
 
@@ -96,6 +100,9 @@ function displayHtmlHeader( $title = 'SquirrelMail', $xtra = '', $do_hook = TRUE
         $header_tags .= $oTemplate->fetch_right_to_left_stylesheet_link();
     }
 
+    // 5. Printer friendly stylesheet
+    $header_tags .= create_css_link($base_uri . 'css/print.css', 'printerfriendly', false, 'print');
+
     if ($squirrelmail_language == 'ja_JP') {
         /*
          * force correct detection of charset, when browser does not follow
@@ -105,7 +112,7 @@ function displayHtmlHeader( $title = 'SquirrelMail', $xtra = '', $do_hook = TRUE
          * recommendations and switch to unicode.
          */
         $header_tags .= "<!-- \xfd\xfe -->\n";
-        $header_tags .= '<meta http-equiv="Content-type" content="text/html; charset=euc-jp" />' . "\n";
+        $header_tags .= '<meta http-equiv="Content-type" content="' . $oTemplate->get_content_type() . '; charset=euc-jp" />' . "\n";
     }
     if ($do_hook) {
         // NOTE! plugins here MUST assign output to template