Fix the link here for search strings
authorjangliss <jangliss@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 26 Apr 2004 23:55:21 +0000 (23:55 +0000)
committerjangliss <jangliss@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 26 Apr 2004 23:55:21 +0000 (23:55 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@7272 7612ce4b-ef26-0410-bec9-ea0150e637f0

src/read_body.php

index 3e431c6449227ca18ea6fa1f29ebdde1b757d743..77f34d873e47f805811365095a3c1ff5ce48251e 100644 (file)
@@ -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) {
 }
 
 function formatToolbar($mailbox, $passed_id, $passed_ent_id, $message, $color) {
-    global $base_uri;
-
+    global $base_uri, $where, $what;
     $urlMailbox = urlencode($mailbox);
     $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 . '&amp;passed_id=' . $urlPassed_id . '&amp;passed_ent_id=' . $urlPassed_ent_id;
+    if (!empty($where)) {
+        $query_string .= '&amp;where=' . urlencode($where);
+    }
+
+    if (!empty($what)) {
+        $query_string .= '&amp;what=' . urlencode($what);
+    }
+
     $url = $base_uri.'src/view_header.php?'.$query_string;
 
     $s  = "<TR>\n" .
     $url = $base_uri.'src/view_header.php?'.$query_string;
 
     $s  = "<TR>\n" .