Kaynağa Gözat

* 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 yıl önce
ebeveyn
işleme
f694f38cec
1 değiştirilmiş dosya ile 3 ekleme ve 1 silme
  1. 3 1
      src/left_main.php

+ 3 - 1
src/left_main.php

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