Fix the save message button, using new functionality marc introduced yesterday.
[squirrelmail.git] / plugins / message_details / message_details_bottom.php
index e028ee2121ae6d9c18a18b8180c5be7bbdc982f3..4695e3c774997119b1dc902904efaa58421c7c85 100644 (file)
@@ -1,17 +1,16 @@
 <?php
 
 /** Message Source  
-*
-* Plugin to view the RFC822 raw message output and the bodystructure of a message
-*
-* Copyright (c) 2002 Marc Groot Koerkamp, The Netherlands
-* Licensed under the GNU GPL. For full terms see the file COPYING.
-* 
-* $Id$
-**/
+ *
+ * Plugin to view the RFC822 raw message output and the bodystructure of a message
+ *
+ * Copyright (c) 2002 Marc Groot Koerkamp, The Netherlands
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ 
+ * $Id$
+ */
 
-chdir('..');
-define('SM_PATH','../');
+define('SM_PATH','../../');
 
 /* SquirrelMail required files. */
 require_once(SM_PATH . 'include/validate.php');
@@ -22,18 +21,26 @@ require_once(SM_PATH . 'functions/prefs.php');
 
 global $color, $uid_support;
 
+$passed_id = $_GET['passed_id'];
+$mailbox = $_GET['mailbox'];
+
+$username = $_SESSION['username'];
+$key = $_COOKIE['key'];
+$onetimepad = $_SESSION['onetimepad'];
+
+
 function CalcEntity($entString, $direction) {
     $result = $entString;
     if ($direction == -1) {
-         $pos = strrpos($entString,'.');
-         $result = substr($entString,0,$pos);
+        $pos = strrpos($entString,'.');
+        $result = substr($entString,0,$pos);
     }
 
     switch ($direction) {
        case 0:
           $pos = strrpos($entString,'.');
           if ($pos === false) {
-            $entString++;
+         $entString++;
             $result= $entString;
           } 
          else {