fixed formatting in case of oldway = false
[squirrelmail.git] / functions / page_header.php
index b44a746c9124aa7d6990a07513ff3a403dafd900..c335530594c48b60b8ecb0ca2b5d0327f96f2431 100644 (file)
@@ -23,7 +23,7 @@ function displayHtmlHeader( $title = 'SquirrelMail', $xtra = '', $do_hook = TRUE
     if ( !sqgetGlobalVar('base_uri', $base_uri, SQ_SESSION) ) {
         global $base_uri;
     }
-    global $theme_css, $custom_css;
+    global $theme_css, $custom_css, $pageheader_sent;
 
     echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">' .
          "\n\n" . html_tag( 'html' ,'' , '', '', '' ) . "\n<head>\n";
@@ -64,6 +64,9 @@ function displayHtmlHeader( $title = 'SquirrelMail', $xtra = '', $do_hook = TRUE
 ECHO;
 
     echo "\n</head>\n\n";
+
+    /* this is used to check elsewhere whether we should call this function */
+    $pageheader_sent = TRUE;
 }
 
 function makeInternalLink($path, $text, $target='') {
@@ -75,7 +78,7 @@ function makeInternalLink($path, $text, $target='') {
 }
 
 function displayInternalLink($path, $text, $target='') {
-    echo makeInternalLink($path, $text, $target='');
+    echo makeInternalLink($path, $text, $target);
 }
 
 function displayPageHeader($color, $mailbox, $xtra='', $session=false) {