Fix problem with javascript when user has other plugins that include a
[squirrelmail.git] / plugins / message_details / message_details_bottom.php
index 2c2eab8b7e6fe0e0b471b2371949a92f85c0de8b..83c33df981a6152cab5e4fa624eff0f91d160540 100644 (file)
@@ -10,7 +10,6 @@
  * $Id$
  */
 
-#chdir ('..');
 define('SM_PATH','../../');
 
 /* SquirrelMail required files. */
@@ -22,18 +21,25 @@ require_once(SM_PATH . 'functions/prefs.php');
 
 global $color, $uid_support;
 
+sqgetGlobalVar('passed_id', $passed_id, SQ_GET);
+sqgetGlobalVar('mailbox', $mailbox, SQ_GET);
+
+sqgetGlobalVar('username', $username, SQ_SESSION);
+sqgetGlobalVar('key', $key, SQ_COOKIE);
+sqgetGlobalVar('onetimepad', $onetimepad, SQ_SESSION);
+
 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 {
@@ -301,11 +307,11 @@ if (count($content) > 0) {
        echo '</td><td>';
        if (isset($content[$i]['name'])) {
            echo $content[$i]['name'];
-       } else echo '&nbsp';
+       } else echo '&nbsp;';
        echo '</td><td>';
        if (isset($content[$i]['encoding'])) {
            echo $content[$i]['encoding'];
-       } else echo '&nbsp';
+       } else echo '&nbsp;';
        echo '</td></tr>'."\n";
     }
     echo '</tbody></table><br>'."\n";