From a3d59ec355dba226b757372fed007c95bf19361e Mon Sep 17 00:00:00 2001 From: kink Date: Sat, 16 Apr 2005 14:20:38 +0000 Subject: [PATCH] Fix a variable typo. Move the inclusion of default.js to before the extra JS code in page_header, because the extra code may use functions from default.js (eg Forward as Attachment, which was broken). git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@9313 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/page_header.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/functions/page_header.php b/functions/page_header.php index 6493e63e..91b5c9a6 100644 --- a/functions/page_header.php +++ b/functions/page_header.php @@ -153,14 +153,12 @@ function displayPageHeader($color, $mailbox, $sHeaderJs='', $sBodyTagJs = 'onloa } if( $javascript_on || strpos($sHeaderJs, 'new_js_autodetect_results.value') ) { + $sJsBlock = '' ."\n"; if ($sHeaderJs) { - $sJsBlock = "\n\n"; - } else { - $sJsBlock = ''; + $sHeaderJs . "\n\n// -->\n\n"; } - $sJsBlock .= "\n" . '' ."\n"; displayHtmlHeader ('SquirrelMail', $sJsBlock); } else { /* do not use JavaScript */ @@ -246,7 +244,7 @@ function compose_Header($color, $mailbox, $sHeaderJs='', $sBodyTagJs = 'onload=" if ($sHeaderJs) { $sJsBlock = "\n\n"; + $sHeaderJs . "\n\n// -->\n\n"; } else { $sJsBlock = ''; } -- 2.25.1