fix listcommands template for Send form changes
[squirrelmail.git] / plugins / message_details / setup.php
index 0b2c1341705942cb34c9328e45f9348b484f214b..b461b13fd8407de25e0a59ed6f6716e7db64c6d7 100644 (file)
@@ -30,13 +30,13 @@ function squirrelmail_plugin_init_message_details()
  * @access private
  */
 function show_message_details(&$links) {
-    global $passed_id, $mailbox, $ent_num;
+    global $passed_id, $mailbox, $passed_ent_id;
     
     if (strlen(trim($mailbox)) < 1) {
         $mailbox = 'INBOX';
     }
 
-    $params = '?passed_ent_id=' . $ent_num .
+    $params = '?passed_ent_id=' . $passed_ent_id .
               '&mailbox=' . urlencode($mailbox) .
               '&passed_id=' . $passed_id;
 
@@ -46,17 +46,19 @@ function show_message_details(&$links) {
 
     /* Output the link. */
     $links[] = array('URL' => $url,
-        'Text' => _("View Message details") );
+        'Text' => _("View Message Details") );
 
     if (checkForJavascript()) {
-        echo '<script type="text/javascript">' . "\n" .
-                '<!--' . "\n" .
-                "  function MessageSource() {\n" .
-                '    window.open("../plugins/message_details/message_details_main.php' .
-                        $params . '","MessageDetails","width=800,height=600");' . "\n".
-                "  }\n" .
-                "// -->\n" .
-                "</script>\n\n";
+        echo '<script type="text/javascript">' . "\n"
+           . '<!--' . "\n"
+           . "  function MessageSource() {\n"
+           . '    window.open("' 
+           . sqm_baseuri() 
+           . 'plugins/message_details/message_details_main.php' .
+                        $params . '","MessageDetails","width=800,height=600");' . "\n"
+           . "  }\n"
+           . "// -->\n"
+           . "</script>\n\n";
     }
 }