removed error messages
authorlkehresman <lkehresman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 1 Feb 2001 20:51:52 +0000 (20:51 +0000)
committerlkehresman <lkehresman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 1 Feb 2001 20:51:52 +0000 (20:51 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@1031 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/imap_mailbox.php
functions/prefs.php
src/compose.php
src/download.php
src/left_main.php
src/load_prefs.php
src/webmail.php

index cec646e..6145b04 100755 (executable)
       for ($g=0; $g < count($line); $g++) {
 
          // Store the raw IMAP reply
-         $boxes[$g]["raw"] = $line[$g];
+         if (isset($line[$g]))
+            $boxes[$g]["raw"] = $line[$g];
+         else
+            $boxes[$g]["raw"] = "";
+
 
          // Count number of delimiters ($dm) in folder name
          $mailbox = trim($line_lsub[$g]);
          $boxes[$g]["unformatted-disp"] = ereg_replace("^" . $folder_prefix, "", $mailbox);
          $boxes[$g]["id"] = $g;
 
+         if (isset($line[$g]))
          ereg("\(([^)]*)\)",$line[$g],$regs);
          $flags = trim(strtolower(str_replace("\\", "",$regs[1])));
          if ($flags) {
 
          fputs ($imap_stream, "a001 LIST \"\" \"$mbx\"\r\n");
          $read = sqimap_read_data ($imap_stream, "a001", true, $response, $message);
+         if (isset($sorted_list_ary[$i]))
+            $sorted_list_ary[$i] = "";
+         if (isset($read[0]))
          $sorted_list_ary[$i] = $read[0];
-         if (find_mailbox_name($sorted_list_ary[$i]) == "INBOX")
+         else
+         $sorget_list_ary[$i] = "";
+         if (isset($sorted_list_ary[$i]) && find_mailbox_name($sorted_list_ary[$i]) == "INBOX")
             $inbox_in_list = true;
       }
                 
index c23d3cb..0a3f47d 100644 (file)
    /** Gets the signature **/
    function getSig($data_dir, $username) {
       $filename = "$data_dir$username.sig";
+      $sig = "";
       if (file_exists($filename)) {
          $file = fopen($filename, "r");
-         $sig = "";
          while (!feof($file)) {
             $sig .= fgets($file, 1024);
          }
index 5acb8cb..c564fcf 100644 (file)
    if (isset($subject))     $subject = trim($subject);
    if (isset($body))        $body = trim($body);
    if (isset($attachfile))  $attachfile = trim($attachfile);
-   
+
    if (!isset($mailbox) || $mailbox == "" || ($mailbox == "None"))
       $mailbox = "INBOX";
 
           $HTTP_POST_FILES['attachfile']['tmp_name'] &&
           $HTTP_POST_FILES['attachfile']['tmp_name'] != 'none')
           $AttachFailure = saveAttachedFiles();
-      if (checkInput(false) && ! isset($AttachFailure)) {
+      if (checkInput(false) && !isset($AttachFailure)) {
          $urlMailbox = urlencode (trim($mailbox));
          if (! isset($reply_id))
              $reply_id = 0;
index 04d760e..a5b0382 100644 (file)
    //    is displayable (text or html), it will load them up in a text
    //    viewer (built in to squirrelmail).  Otherwise, it sets the
    //    content-type as application/octet-stream
-
-   header("Pragma: ");
-   header("Content-Description: SquirrelMail Attachment");
+   
    if (isset($absolute_dl) && $absolute_dl == "true") {
       switch($type0) {
          case "text":
             $body = mime_fetch_body($imapConnection, $passed_id, $passed_ent_id);
             $body = decodeBody($body, $header->encoding);
-            header("Content-Disposition: attachment; filename=$filename");
-            header("Content-type: application/octet-stream; name=$filename");
+            header("Content-Disposition: attachment; filename=\"$filename\"");
+            header("Content-type: application/octet-stream; name=\"$filename\"");
             set_up_language(getPref($data_dir, $username, "language"));
             if ($type1 == "plain") {
                echo _("Subject") . ": " . decodeHeader(sqStripSlashes($top_header->subject)) . "\n";
             echo trim($body);
             break;
          default:
-            header("Content-Disposition: attachment; filename=$filename");
-            header("Content-type: application/octet-stream; name=$filename");
+            header("Content-Disposition: attachment; filename=\"$filename\"");
+            header("Content-type: application/octet-stream; name=\"$filename\"");
             mime_print_body_lines ($imapConnection, $passed_id, $passed_ent_id, $header->encoding);
             break;
       }
             } else {
                 $body = mime_fetch_body($imapConnection, $passed_id, $passed_ent_id);
                 $body = decodeBody($body, $header->encoding);
-                header("Content-type: $type0/$type1; name=$filename");
-                header("Content-Disposition: attachment; filename=$filename");
+                header("Content-type: $type0/$type1; name=\"$filename\"");
+                header("Content-Disposition: attachment; filename=\"$filename\"");
                 echo $body;
             }
             break;
index 718c0ff..0077c07 100644 (file)
       $line = "";
       $mailbox = $boxes[$i]["formatted"];
       
-      if ($boxes[$i]["flags"]) {
+      if (isset($boxes[$i]["flags"])) {
          $noselect = false;
          for ($h = 0; $h < count($boxes[$i]["flags"]); $h++) {
             if (strtolower($boxes[$i]["flags"][$h]) == "noselect")
             $line .= formatMailboxName($imapConnection, $mailbox, $boxes[$i]["unformatted"], $delimeter, $boxes[$i]["unseen"]);
          }
       } else {
+        if (!isset($boxes[$i]["unseen"])) 
+            $boxes[$i]["unseen"] = "";
          $line .= formatMailboxName($imapConnection, $mailbox, $boxes[$i]["unformatted"], $delimeter, $boxes[$i]["unseen"]);
       }
       echo "$line<BR>\n";
index 01452b1..0380b4d 100644 (file)
       $index_order[$i] = $order;
       $order = getPref($data_dir, $username, "order".($i+1));
    }
-   if (!$index_order) {
+   if (!isset($index_order)) {
       $index_order[1] = 1;
       $index_order[2] = 2;
       $index_order[3] = 3;
index 8ca5aa8..95e2f41 100644 (file)
@@ -72,6 +72,8 @@
     This was done to create a pure HTML way of refreshing the folder list since
     we would like to use as little Javascript as possible.
 **/
+   if (!isset($right_frame)) $right_frame = "";
+
    if ($right_frame == 'right_main.php') {
       $urlMailbox = urlencode($mailbox);
       $right_frame_url = "right_main.php?mailbox=$urlMailbox&sort=$sort&startMessage=$startMessage";