[Svn] r1918 - in trunk/roundcubemail: . program/steps/mail

trac at roundcube.net trac at roundcube.net
Thu Oct 2 19:48:30 CEST 2008


Author: alec
Date: 2008-10-02 12:48:29 -0500 (Thu, 02 Oct 2008)
New Revision: 1918

Modified:
   trunk/roundcubemail/CHANGELOG
   trunk/roundcubemail/program/steps/mail/func.inc
Log:
- Fix race conditions when changing mailbox (set some env variables only when needed - no action or action==list)


Modified: trunk/roundcubemail/CHANGELOG
===================================================================
--- trunk/roundcubemail/CHANGELOG	2008-10-02 17:26:16 UTC (rev 1917)
+++ trunk/roundcubemail/CHANGELOG	2008-10-02 17:48:29 UTC (rev 1918)
@@ -5,6 +5,7 @@
 ----------
 - Minimize "inline" javascript scripts use (#1485433)
 - Fix css class setting for folders with names matching defined classes names (#1485355)
+- Fix race conditions when changing mailbox
 
 2008/10/01 (alec)
 - Fix spellchecking when switching to html editor (#1485362)

Modified: trunk/roundcubemail/program/steps/mail/func.inc
===================================================================
--- trunk/roundcubemail/program/steps/mail/func.inc	2008-10-02 17:26:16 UTC (rev 1917)
+++ trunk/roundcubemail/program/steps/mail/func.inc	2008-10-02 17:48:29 UTC (rev 1918)
@@ -53,25 +53,26 @@
   $OUTPUT->set_env('search_text', $_SESSION['last_text_search']);
   }
 
+// set main env variables, labels and page title
+if (empty($RCMAIL->action) || $RCMAIL->action == 'list')
+  {
+  // set current mailbox in client environment
+  $OUTPUT->set_env('mailbox', $IMAP->get_mailbox_name());
+  $OUTPUT->set_env('quota', $IMAP->get_capability('quota'));
+  $OUTPUT->set_env('delimiter', $IMAP->get_hierarchy_delimiter());
 
-// set current mailbox in client environment
-$OUTPUT->set_env('mailbox', $IMAP->get_mailbox_name());
-$OUTPUT->set_env('quota', $IMAP->get_capability('quota'));
-$OUTPUT->set_env('delimiter', $IMAP->get_hierarchy_delimiter());
+  if ($CONFIG['trash_mbox'])
+    $OUTPUT->set_env('trash_mailbox', $CONFIG['trash_mbox']);
+  if ($CONFIG['drafts_mbox'])
+    $OUTPUT->set_env('drafts_mailbox', $CONFIG['drafts_mbox']);
+  if ($CONFIG['junk_mbox'])
+    $OUTPUT->set_env('junk_mailbox', $CONFIG['junk_mbox']);
 
-if ($CONFIG['trash_mbox'])
-  $OUTPUT->set_env('trash_mailbox', $CONFIG['trash_mbox']);
-if ($CONFIG['drafts_mbox'])
-  $OUTPUT->set_env('drafts_mailbox', $CONFIG['drafts_mbox']);
-if ($CONFIG['junk_mbox'])
-  $OUTPUT->set_env('junk_mailbox', $CONFIG['junk_mbox']);
+  if (!$OUTPUT->ajax_call)
+    rcube_add_label('checkingmail', 'deletemessage', 'movemessagetotrash', 'movingmessage');
 
-if (!$OUTPUT->ajax_call)
-  rcube_add_label('checkingmail', 'deletemessage', 'movemessagetotrash', 'movingmessage');
-
-// set page title
-if (empty($RCMAIL->action) || $RCMAIL->action == 'list')
   $OUTPUT->set_pagetitle(rcmail_localize_foldername($IMAP->get_mailbox_name()));
+  }
 
 
 /**

_______________________________________________
http://lists.roundcube.net/mailman/listinfo/svn



More information about the Svn mailing list