translator moved to other address
[squirrelmail.git] / src / read_body.php
index 9cce574aeb8d89ab742cfbd0968e8395181669a3..77f34d873e47f805811365095a3c1ff5ce48251e 100644 (file)
@@ -125,9 +125,9 @@ function findPreviousMessage($numMessages, $passed_id) {
 function printer_friendly_link($mailbox, $passed_id, $passed_ent_id) {
     global $javascript_on, $color;
 
-    $params = '?passed_ent_id=' . $passed_ent_id .
+    $params = '?passed_ent_id=' . urlencode($passed_ent_id) .
               '&mailbox=' . urlencode($mailbox) .
-              '&passed_id=' . $passed_id;
+              '&passed_id=' . urlencode($passed_id);
 
     $print_text = _("View Printable Version");
 
@@ -733,14 +733,22 @@ function formatMenubar($mailbox, $passed_id, $passed_ent_id, $message, $mbx_resp
 }
 
 function formatToolbar($mailbox, $passed_id, $passed_ent_id, $message, $color) {
-    global $base_uri;
-
+    global $base_uri, $where, $what;
     $urlMailbox = urlencode($mailbox);
-    if (!sqgetGlobalVar('QUERY_STRING', $query_string, SQ_SERVER)) {
-        // FIX ME !. If this happens there is something else wrong. Falling
-        // back to '' won't help. We should raise an error instead.
-        $query_string = '';                                                                                                         
-    } 
+    $urlPassed_id = urlencode($passed_id);
+    $urlPassed_ent_id = urlencode($passed_ent_id);
+    $query_string = 'mailbox=' . $urlMailbox . '&passed_id=' . $urlPassed_id . '&passed_ent_id=' . $urlPassed_ent_id;
+    if (!empty($where)) {
+        $query_string .= '&where=' . urlencode($where);
+    }
+
+    if (!empty($what)) {
+        $query_string .= '&what=' . urlencode($what);
+    }
+
     $url = $base_uri.'src/view_header.php?'.$query_string;
 
     $s  = "<TR>\n" .