do not add target=_blank for the javascript version
authorkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 13 May 2008 10:10:14 +0000 (10:10 +0000)
committerkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 13 May 2008 10:10:14 +0000 (10:10 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@13134 7612ce4b-ef26-0410-bec9-ea0150e637f0

src/read_body.php

index 1a1ea11..77643e3 100644 (file)
@@ -688,22 +688,25 @@ function formatToolbar($mailbox, $passed_id, $passed_ent_id, $message, $color) {
     }
     $url = $base_uri.'src/view_header.php?'.$query_string;
 
     }
     $url = $base_uri.'src/view_header.php?'.$query_string;
 
-    if ( checkForJavaScript() ) { 
-        $pf_params = 'javascript:printThis();';
-    } else {
-        $pf_params = set_url_var($PHP_SELF, 'print', '1');
-    }
-
     $links = array();
     $links[] = array (
                         'URL'   => $url,
                         'Text'  => _("View Full Header")
                      );
     $links = array();
     $links[] = array (
                         'URL'   => $url,
                         'Text'  => _("View Full Header")
                      );
-    $links[] = array (
-                        'URL'   => $pf_params,
+
+    if ( checkForJavaScript() ) { 
+        $links[] = array (
+                        'URL'   => 'javascript:printThis();',
+                        'Text'  => _("Print"),
+                     );
+    } else {
+        $links[] = array (
+                        'URL'   => set_url_var($PHP_SELF, 'print', '1'),
                         'Text'  => _("Print"),
                         'Target' => '_blank'
                      );
                         'Text'  => _("Print"),
                         'Target' => '_blank'
                      );
+    }
+
     $links[] = array (
                         'URL'   => $download_href,
                         'Text'  => _("Download this as a file")
     $links[] = array (
                         'URL'   => $download_href,
                         'Text'  => _("Download this as a file")