浏览代码

Fix the link here for search strings

jangliss 21 年之前
父节点
当前提交
03a66d54b3
共有 1 个文件被更改,包括 15 次插入7 次删除
  1. 15 7
      src/read_body.php

+ 15 - 7
src/read_body.php

@@ -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 . '&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;
     $url = $base_uri.'src/view_header.php?'.$query_string;
 
 
     $s  = "<TR>\n" .
     $s  = "<TR>\n" .