瀏覽代碼

* Hopefully we won't need to do this EVERY time... so I added code
to avoid any expensive IMAP calls (maybe all IMAP calls are expensive ...
<grin>)

Tyler Akins 24 年之前
父節點
當前提交
f694f38cec
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      src/left_main.php

+ 3 - 1
src/left_main.php

@@ -20,7 +20,7 @@
    
    displayHtmlHeader();
 
-   if ($auto_create_special) {
+   if ($auto_create_special && ! isset($auto_create_done)) {
    	  if (isset ($sent_folder) && $sent_folder != "none") {
 	  	 if (!sqimap_mailbox_exists ($imapConnection, $sent_folder)) {
 		 	sqimap_mailbox_create ($imapConnection, $sent_folder, "");
@@ -31,6 +31,8 @@
 		 	sqimap_mailbox_create ($imapConnection, $trash_folder, "");
 		 }
 	  }
+	  $auto_create_done = true;
+	  session_register('auto_create_done');
    }
 
    function formatMailboxName($imapConnection, $box_array, $delimeter) {