From: kink Date: Sat, 16 Apr 2005 14:20:38 +0000 (+0000) Subject: Fix a variable typo. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=a3d59ec355dba226b757372fed007c95bf19361e;p=squirrelmail.git 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 --- 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 = ''; }