Browse Source

fixed warnings and fixed broken part of my updated sqimap_read_data()

Luke Ehresman 24 years ago
parent
commit
cd371ecca9
3 changed files with 7 additions and 4 deletions
  1. 2 2
      config/config_default.php
  2. 4 2
      functions/imap_general.php
  3. 1 0
      functions/mime.php

+ 2 - 2
config/config_default.php

@@ -163,10 +163,10 @@
 
     $attachment_dir = $data_dir;
 
-//  This is the default size of the folder list.  Default is 200,
+//  This is the default size of the folder list.  Default is 150,
 //  but you can set it to whatever you wish.
 
-   $default_left_size = 200;
+   $default_left_size = 150;
 
 //  Some IMAP servers allow a username (like "bob") to log in if they use
 //  uppercase in their name (like "Bob" or "BOB").  This creates extra

+ 4 - 2
functions/imap_general.php

@@ -25,7 +25,7 @@
          $size = 0;
       }
       
-      $data = Array();
+      $data = array();
       $total_size = 0;
       
       $continue = true;
@@ -46,7 +46,9 @@
             if ($total_size == $size) {
                $data[] = $read;
                $read = fgets($imap_stream, 9096);
-               $read = fgets($imap_stream, 9096);
+               while (!ereg("^$pre (OK|BAD|NO)(.*)$", $read, $regs)) {
+                  $read = fgets($imap_stream, 9096);
+               }
                $continue = false;
             } else if ($total_size > $size) {
                $difference = $total_size - $size;

+ 1 - 0
functions/mime.php

@@ -192,6 +192,7 @@
             // loop through until we find a space or an end parenthesis
             $pos = 0;
             $char = substr($structure, $pos, 1);
+            $text = "";
             while ($char != " " && $char != ")" && $pos < strlen($structure)) {
                $text .= $char;
                $pos++;