[Vtigercrm-commits] [vtiger-commits] r6720 - /vtigercrm/trunk/modules/Webmails/ListView.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Mon May 29 18:23:19 EDT 2006
Author: mmbrich
Date: Mon May 29 16:23:18 2006
New Revision: 6720
Log:
massive speed improvement with imap_status()
Modified:
vtigercrm/trunk/modules/Webmails/ListView.php
Modified: vtigercrm/trunk/modules/Webmails/ListView.php
==============================================================================
--- vtigercrm/trunk/modules/Webmails/ListView.php (original)
+++ vtigercrm/trunk/modules/Webmails/ListView.php Mon May 29 16:23:18 2006
@@ -285,13 +285,11 @@
$folders .= '<li><img src="'.$image_path.'/'.$img.'" align="absmiddle" /> <a href="javascript:changeMbox(\''.$tmpval.'\');" class="webMnu" onmouseover="show_remfolder(\''.$tmpval.'\');" onmouseout="show_remfolder(\''.$tmpval.'\');">'.$tmpval.'</a> <span id="'.$tmpval.'_count" style="font-weight:bold">(<span id="'.$tmpval.'_unread">'.$new_msgs.'</span> of <span id="'.$tmpval.'_read">'.$numEmails.'</span>)</span> <span id="remove_'.$tmpval.'" style="position:relative;display:none">Remove</span></li>';
} else {
- $tmpbox = getImapMbox($tmpval,$temprow,"true");
- $box = imap_mailboxmsginfo($tmpbox);
- $_SESSION["mailboxes"][$tmpval] = $box->Unread;
+ $box = imap_status($mbox, "{".$imapServerAddress."}".$tmpval, SA_ALL);
+ $_SESSION["mailboxes"][$tmpval] = $box->unseen;
$boxes .= '<option value="'.$tmpval.'">'.$tmpval;
- $folders .= '<li><img src="'.$image_path.'/'.$img.'" align="absmiddle" /> <a href="javascript:changeMbox(\''.$tmpval.'\');" class="webMnu">'.$tmpval.'</a> <span id="'.$tmpval.'_count" style="font-weight:bold">(<span id="'.$tmpval.'_unread">'.$box->Unread.'</span> of <span id="'.$tmpval.'_read">'.$box->Nmsgs.'</span>)</span></li>';
- imap_close($tmpbox);
+ $folders .= '<li><img src="'.$image_path.'/'.$img.'" align="absmiddle" /> <a href="javascript:changeMbox(\''.$tmpval.'\');" class="webMnu">'.$tmpval.'</a> <span id="'.$tmpval.'_count" style="font-weight:bold">(<span id="'.$tmpval.'_unread">'.$box->unseen.'</span> of <span id="'.$tmpval.'_read">'.$box->messages.'</span>)</span></li>';
}
}
$boxes .= '</select>';
More information about the vtigercrm-commits
mailing list