bringing back forwarding functionality for message list when comp_in_new is turned...
authorpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 15 Mar 2005 22:42:15 +0000 (22:42 +0000)
committerpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 15 Mar 2005 22:42:15 +0000 (22:42 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@9041 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/page_header.php

index 424d420a7f563a3c23ab8e740118363fae10ac86..37d6c7dd1d6128333bb6a05fea058ddfc39168ab 100644 (file)
@@ -264,9 +264,14 @@ function displayPageHeader($color, $mailbox, $xtra='', $session=false) {
             break;
 
         case 'src/right_main.php':
-// following code graciously stolen from phpMyAdmin project at:
-// http://www.phpmyadmin.net
-            $js = <<<EOS
+            global $fancy_index_highlite;
+            if (!$fancy_index_highlite) {
+                $js = '';
+            } else //{ putting braces around this block creats strange PHP errors
+                // following code graciously borrowed from 
+                // phpMyAdmin project at:
+                // http://www.phpmyadmin.net
+                $js = <<<EOS
 /**
  * This array is used to remember mark status of rows in browse mode
  */
@@ -418,6 +423,7 @@ function setPointer(theRow, theRowNum, theAction, theDefaultColor, thePointerCol
     return true;
 } // end of the 'setPointer()' function
 EOS;
+            //} putting braces around this block creats strange PHP errors
             $js = "\n".'<script language="JavaScript" type="text/javascript">' .
                         "\n<!--\n" . $js;
             if ($compose_new_win == '1') {
@@ -427,7 +433,7 @@ EOS;
                 if (!preg_match("/^[0-9]{3,4}$/", $compose_height)) {
                     $compose_height = '550';
                 }
-                $js .= "\nfunction comp_in_new(comp_uri) {\n".
+                $js .= "\n\nfunction comp_in_new(comp_uri) {\n".
                      "       if (!comp_uri) {\n".
                      '           comp_uri = "'.$compose_uri."\";\n".
                      '       }'. "\n".
@@ -437,7 +443,7 @@ EOS;
                      ',scrollbars=yes,resizable=yes,status=yes");'."\n".
                      "}\n\n";
             }
-            $js .= "// -->\n</script>\n";
+            $js .= $xtra . "\n\n// -->\n</script>\n";
             $onload = '';
             displayHtmlHeader ('SquirrelMail', $js);
             break;