More rg=0
[squirrelmail.git] / src / download.php
index 574420ec16baa09bd44c3fe5b1f18bc51ca8341e..907b5b5f2ec338d481646fcfcf348f6ff86a0ae2 100644 (file)
@@ -23,6 +23,46 @@ require_once(SM_PATH . 'functions/mime.php');
 header('Pragma: ');
 header('Cache-Control: cache');
 
+/* globals */
+
+$key = $_COOKIE['key'];
+$username = $_SESSION['username'];
+$onetimepad = $_SESSION['onetimepad'];
+$mailbox = $_GET['mailbox'];
+$passed_id = $_GET['passed_id'];
+$passed_ent_id = $_GET['passed_ent_id'];
+$base_uri = $base_uri = $_SESSION['base_uri'];
+
+if (isset($_GET['startMessage'])) {
+    $startMessage = $_GET['startMessage'];
+}
+if(isset($_GET['where'])) {
+    $where = $_GET['where'];
+}
+if(isset($_GET['what'])) {
+    $what = $_GET['what'];
+}
+if(isset($_GET['showHeaders'])) {
+    $showHeaders = $_GET['showHeaders'];
+}
+if(isset($_GET['absolute_dl'])) {
+    $absolute_dl = $_GET['absolute_dl'];
+}
+if (isset($_GET['show_more_cc'])) {
+    $show_more = $_GET['show_more_cc'];
+}
+if(isset($_GET['show_more_bcc'])) {
+    $show_more = $_GET['show_more_bcc'];
+}
+if(isset($_GET['show_more'])) {
+    $show_more = $_GET['show_more'];
+}
+if(isset($_GET['sort'])) {
+    $sort = $_GET['sort'];
+}    
+/* end globals */
+
 function get_extract_to_target_list($imapConnection) {
     $boxes = sqimap_mailbox_list($imapConnection);
     for ($i = 0; $i < count($boxes); $i++) {  
@@ -158,9 +198,11 @@ mime_print_body_lines ($imapConnection, $passed_id, $ent_id, $encoding);
  * version of IE.  I don't know if it works with Opera, but it should now.
  */
 function DumpHeaders($type0, $type1, $filename, $force) {
-    global $HTTP_USER_AGENT, $languages, $squirrelmail_language;
+    global $_SERVER, $languages, $squirrelmail_language;
     $isIE = 0;
 
+    $HTTP_USER_AGENT = $_SERVER['HTTP_USER_AGENT'];
+
     if (strstr($HTTP_USER_AGENT, 'compatible; MSIE ') !== false &&
         strstr($HTTP_USER_AGENT, 'Opera') === false) {
         $isIE = 1;