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 cec646e1e505e61d4a3da16907907650d728f369..6145b0406717e0466dfbff707a790a2c8cc0f116 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 c23d3cb88dc2f7c0471d27e20e52a1d8dc287645..0a3f47de4aae1264587a5514c01e8a5b8afd67ea 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 5acb8cb477d394db1913af1782c76ef591f3fbe4..c564fcfe0df5cc4e36bbfc7e1159929a94ebfb69 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 04d760e30d9242301633178c0ceea37587e3e882..a5b0382a13ac9011286fc6671cb5116cf4e512cc 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 718c0ffa8329389177ef1a686679463a6c2faf68..0077c07d8f478610fd1b47850c1e70cc0eddf17a 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 01452b1ad68a933ef4521d01e060df36559871da..0380b4dec7b9b7c9379b7945e4fad8ce846da588 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 8ca5aa8e787608eb9c9ad0ca330dbc0cb729b7ea..95e2f41daaed8e9287e0828bba645322f4baf6d5 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";