More cleanup. This dir all done.
[squirrelmail.git] / src / read_body.php
index 93b078d52da4712fa383f16f0629cccf3adde96c..465c2e9428f73b5050f336a2be225c00fcb327d3 100644 (file)
@@ -17,6 +17,7 @@ define('SM_PATH','../');
 
 /* SquirrelMail required files. */
 require_once(SM_PATH . 'include/validate.php');
+require_once(SM_PATH . 'functions/global.php');
 require_once(SM_PATH . 'functions/imap.php');
 require_once(SM_PATH . 'functions/mime.php');
 require_once(SM_PATH . 'functions/date.php');
@@ -643,12 +644,12 @@ function formatToolbar($mailbox, $passed_id, $passed_ent_id, $message, $color) {
 
 /* get the globals we may need */
 
-/** SESSION VARS */
+sqgetGlobalVar('key',       $key,           SQ_COOKIE);
 sqgetGlobalVar('username',  $username,      SQ_SESSION);
 sqgetGlobalVar('onetimepad',$onetimepad,    SQ_SESSION);
-sqgetGlobalVar('msgs',      $msgs,          SQ_SESSION);
-sqgetGlobalVar('base_uri',  $base_uri,      SQ_SESSION);
 sqgetGlobalVar('delimiter', $delimiter,     SQ_SESSION);
+sqgetGlobalVar('base_uri',  $base_uri,      SQ_SESSION);
+
 sqgetGlobalVar('msgs',      $msgs,          SQ_SESSION);
 sqgetGlobalVar('msort',     $msort,         SQ_SESSION);
 sqgetGlobalVar('lastTargetMailbox', $lastTargetMailbox, SQ_SESSION);
@@ -657,9 +658,6 @@ if (!sqgetGlobalVar('messages', $messages, SQ_SESSION) ) {
     $messages = array();
 }
 
-/** COOKIE VARS */
-sqgetGlobalVar('key',       $key,           SQ_COOKIE);
-
 /** GET VARS */
 sqgetGlobalVar('sendreceipt',   $sendreceipt,   SQ_GET);
 sqgetGlobalVar('where',         $where,         SQ_GET);
@@ -697,10 +695,6 @@ if ( sqgetGlobalVar('startMessage', $temp) ) {
 /* end of get globals */
 global $uid_support, $sqimap_capabilities;
 
-if (isset($mailbox)) {
-    $mailbox = urldecode( $mailbox );
-}
-
 $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
 $mbx_response   = sqimap_mailbox_select($imapConnection, $mailbox, false, false, true);