* Removed a warning
[squirrelmail.git] / functions / imap_mailbox.php
index fe1baee55e4ae43cdcd735b0b571c1672ed9694f..d0252d68e22f0aa9345f1fe608a41e2927089d1b 100755 (executable)
          if (substr($mailbox, -1) == $dm)
             $mailbox = substr($mailbox, 0, strlen($mailbox) - 1);
          $boxes[$g]['unformatted'] = $mailbox;
-         //$boxes[$g]['unformatted-disp'] = ereg_replace('^' . $folder_prefix, '', $mailbox);
          if (substr($mailbox,0,strlen($folder_prefix))==$folder_prefix) { 
             $boxes[$g]['unformatted-disp'] = substr($mailbox, strlen($folder_prefix));
          } else if (strtolower($mailbox) == "inbox") {
          $flags = trim(strtolower(str_replace('\\', '',$regs[1])));
          if ($flags) {
             $boxes[$g]['flags'] = explode(' ', $flags);
-         }
-        else
-            $boxes[$g]['flags'] = array();
+         } else
+            $boxes[$g]['flags'] = array();
       }
 
       return $boxes;
 
       /** LSUB array **/
       $inbox_subscribed = false;
-      fputs ($imap_stream, "a001 LSUB \"\" \"*\"\r\n");
+      fputs ($imap_stream, "a001 LSUB \"\" \"*%\"\r\n");
       $lsub_ary = sqimap_read_data ($imap_stream, "a001", true, $response, $message);
 
       /** OS: we don't want to parse last element of array, 'cause it is OK command, so we unset it **/
             if ($flags) {
                $boxes[$g]['flags'] = explode(" ", $flags);
             }
-           else
-           {
-              $boxes[$g]['flags'] = array();
-           }
+            else
+            {
+               $boxes[$g]['flags'] = array();
+            }
          }
          $g++;
       }