- Improve recovery when EHLO not supported on legacy SMTP servers
[squirrelmail.git] / functions / mailbox_display.php
index ea999a9638c8edb4553b72a9ae9d5978a4232c3c..f17071d347bdee5c56311df01c3b4b3681331a45 100644 (file)
@@ -6,21 +6,12 @@
  * This contains functions that display mailbox information, such as the
  * table row that has sender, date, subject, etc...
  *
- * @copyright © 1999-2005 The SquirrelMail Project Team
+ * @copyright © 1999-2006 The SquirrelMail Project Team
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  * @version $Id$
  * @package squirrelmail
  */
 
-/** The standard includes.. */
-require_once(SM_PATH . 'functions/strings.php');
-require_once(SM_PATH . 'functions/html.php');
-require_once(SM_PATH . 'functions/imap_mailbox.php');
-require_once(SM_PATH . 'functions/imap_messages.php');
-require_once(SM_PATH . 'functions/imap_asearch.php');
-require_once(SM_PATH . 'functions/mime.php');
-require_once(SM_PATH . 'functions/forms.php');
-
 
 /**
  * Selects a mailbox for header retrieval.
@@ -346,6 +337,12 @@ function fetchMessageHeaders($imapConnection, &$aMailbox) {
         $id_slice = array_slice($aUid,$start_msg-1,$iLimit);
         /* do some funky cache checks */
         if (isset($aMailbox['MSG_HEADERS']) && is_array($aMailbox['MSG_HEADERS'])) {
+            // temp code, read_body del / next links fo not update fields.
+            foreach ($aMailbox['MSG_HEADERS'] as $iUid => $aValue) {
+                if (!isset($aValue['UID'])) {
+                    unset($aMailbox['MSG_HEADERS'][$iUid]);
+                }
+            }
             $aUidCached = array_keys($aMailbox['MSG_HEADERS']);
         } else {
             $aMailbox['MSG_HEADERS'] = array();
@@ -603,9 +600,9 @@ function prepareMessageList(&$aMailbox, $aProps) {
                         $link = $sTargetModule.'.php?' . implode('&',$aQuery);
 
                         // see top of this function for which attributes are available
-                        // in the global scope for plugin use (like $link, $target, 
+                        // in the global scope for plugin use (like $link, $target,
                         // $onclick, $link_extra, $title, and so forth)
-                        // plugins are responsible for sharing nicely (such as for 
+                        // plugins are responsible for sharing nicely (such as for
                         // setting the target, etc)
                         do_hook('subject_link', array($iPageOffset, $sSearch, $aSearch));
                     }